We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34b239d commit 8dc34ecCopy full SHA for 8dc34ec
src/session.rs
@@ -444,7 +444,7 @@ where S::Artifact: IntoInit<M::Init>
444
type Connection = S::Connection;
445
type Artifact = ProtocolArtifact<M, S>;
446
447
- fn is_established(&self) -> bool { self.state.is_complete() }
+ fn is_established(&self) -> bool { self.state.is_complete() && self.artifact().is_some() }
448
449
fn run_handshake(&mut self) -> io::Result<()> {
450
#[cfg(feature = "log")]
@@ -662,6 +662,6 @@ mod impl_socks5 {
662
663
fn is_init(&self) -> bool { true }
664
665
- fn is_complete(&self) -> bool { matches!(self, Socks5::Active(_)) }
+ fn is_complete(&self) -> bool { matches!(self, Socks5::Active(_)) && self.artifact().is_some() }
666
}
667
0 commit comments