diff --git a/.travis.yml b/.travis.yml index 227853669..cb3067056 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ branches: - master - /^beta-.*$/ - /^stable-.*$/ + - /^beta$/ + - /^stable$/ matrix: fast_finish: true include: diff --git a/util/src/network/host.rs b/util/src/network/host.rs index 24c3460db..50cf294bc 100644 --- a/util/src/network/host.rs +++ b/util/src/network/host.rs @@ -599,6 +599,9 @@ impl Host where Message: Send + Sync + Clone { fn start_session(&self, token: StreamToken, io: &IoContext>) { let mut connections = self.connections.write().unwrap(); + if connections.get(token).is_none() { + return; // handshake expired + } connections.replace_with(token, |c| { match Arc::try_unwrap(c).ok().unwrap().into_inner().unwrap() { ConnectionEntry::Handshake(h) => {