aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/stream.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-08 12:06:27 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-08 12:06:27 -0400
commitdb2a66af41525c3d5d31430f41aa750914e403fc (patch)
tree00fd264f8198dc5645591e435f294e2df2fdca0a /src/cmd/stream.rs
parent537630f923f2a5fd5ff9e14d6cf4eaaa4539261a (diff)
downloadteleterm-db2a66af41525c3d5d31430f41aa750914e403fc.tar.gz
teleterm-db2a66af41525c3d5d31430f41aa750914e403fc.zip
split Reconnect events into Disconnect/Connect
this makes the logic easier to follow, and also opens up the possibility of doing something different during times that we are actively disconnected
Diffstat (limited to 'src/cmd/stream.rs')
-rw-r--r--src/cmd/stream.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/stream.rs b/src/cmd/stream.rs
index dc0e18d..28fd6b1 100644
--- a/src/cmd/stream.rs
+++ b/src/cmd/stream.rs
@@ -191,7 +191,10 @@ impl StreamSession {
) -> Result<crate::component_future::Poll<()>> {
match self.client.poll().context(Client) {
Ok(futures::Async::Ready(Some(e))) => match e {
- crate::client::Event::Reconnect(size) => {
+ crate::client::Event::Disconnect => {
+ Ok(crate::component_future::Poll::DidWork)
+ }
+ crate::client::Event::Connect(size) => {
self.sent_remote = 0;
self.process.resize(size);
Ok(crate::component_future::Poll::DidWork)