diff --git a/src/transport/tcp/mod.rs b/src/transport/tcp/mod.rs index 856c9410..24e4ef54 100644 --- a/src/transport/tcp/mod.rs +++ b/src/transport/tcp/mod.rs @@ -557,6 +557,7 @@ impl Stream for TcpTransport { Ok(connection) => { let peer = connection.peer(); let endpoint = connection.endpoint(); + self.pending_dials.remove(&connection.connection_id()); self.pending_open.insert(connection.connection_id(), connection); return Poll::Ready(Some(TransportEvent::ConnectionEstablished { diff --git a/src/transport/websocket/mod.rs b/src/transport/websocket/mod.rs index f7999735..03c58191 100644 --- a/src/transport/websocket/mod.rs +++ b/src/transport/websocket/mod.rs @@ -599,6 +599,7 @@ impl Stream for WebSocketTransport { Ok(connection) => { let peer = connection.peer(); let endpoint = connection.endpoint(); + self.pending_dials.remove(&connection.connection_id()); self.pending_open.insert(connection.connection_id(), connection); return Poll::Ready(Some(TransportEvent::ConnectionEstablished {