I'm using mio and tungstenite, and it would be nice to have a way to discard the handle when being refused a handshake:
match mid.handshake() {
Ok(x) => *space = SocketSpace::Connected(x),
Err(HandshakeError::Interrupted(mid)) => *space = SocketSpace::Connecting(mid),
Err(HandshakeError::Failure(err)) => {
discard(mid.stream?! halp)
}
}
I'm using mio and tungstenite, and it would be nice to have a way to discard the handle when being refused a handshake: