From ac5d0ab3fef5c398ef71a12bd42a1609bf4de9e1 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Tue, 18 Oct 2016 15:11:32 -0700 Subject: [PATCH] fix(net): Implement `blocked()` for OpensslStream This should fix some busy looping when using OpenSSL. For example, if the transport was blocked on a read, it wasn't surfaced to the `http::Conn` and so the wrong interest was registered with the event loop. Registering for the wrong interest triggered calls to `http::Conn::ready()` which were unable to make progress. --- src/net.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net.rs b/src/net.rs index d123a70a..c49930c5 100644 --- a/src/net.rs +++ b/src/net.rs @@ -636,6 +636,10 @@ mod openssl { fn take_socket_error(&mut self) -> io::Result<()> { self.stream.get_mut().take_socket_error() } + + fn blocked(&self) -> Option { + self.blocked + } } }