State is disconnected, not invalid

This commit is contained in:
xmppftw 2023-12-19 20:20:03 +01:00 committed by pep
parent 034976748a
commit aabd19f78c

View file

@ -133,7 +133,10 @@ impl<C: ServerConnector> Stream for Client<C> {
self.state = ClientState::Connecting(connect); self.state = ClientState::Connecting(connect);
self.poll_next(cx) self.poll_next(cx)
} }
ClientState::Disconnected => Poll::Ready(None), ClientState::Disconnected => {
self.state = ClientState::Disconnected;
Poll::Pending
}
ClientState::Connecting(mut connect) => match Pin::new(&mut connect).poll(cx) { ClientState::Connecting(mut connect) => match Pin::new(&mut connect).poll(cx) {
Poll::Ready(Ok(Ok(stream))) => { Poll::Ready(Ok(Ok(stream))) => {
let bound_jid = stream.jid.clone(); let bound_jid = stream.jid.clone();