diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-08 12:06:27 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-08 12:06:27 -0400 |
commit | db2a66af41525c3d5d31430f41aa750914e403fc (patch) | |
tree | 00fd264f8198dc5645591e435f294e2df2fdca0a /src/cmd/stream.rs | |
parent | 537630f923f2a5fd5ff9e14d6cf4eaaa4539261a (diff) | |
download | teleterm-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.rs | 5 |
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) |