From 3f34f2bd1d99f310913ad0c85136e5c301c71609 Mon Sep 17 00:00:00 2001 From: Shane Gibbs Date: Fri, 18 Nov 2016 16:01:26 +0000 Subject: [PATCH] fix(http): move hup check before writable check --- src/http/conn.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http/conn.rs b/src/http/conn.rs index e7c7934b..54cef874 100644 --- a/src/http/conn.rs +++ b/src/http/conn.rs @@ -631,10 +631,6 @@ impl> Conn { self.0.on_readable(scope); } - if events.is_writable() { - self.0.on_writable(scope); - } - if events.is_hup() { trace!("Conn::ready got hangup"); let _ = scope.deregister(&self.0.transport); @@ -642,6 +638,10 @@ impl> Conn { return ReadyResult::Done(None); } + if events.is_writable() { + self.0.on_writable(scope); + } + let mut events = match self.0.register() { Reg::Read => EventSet::readable(), Reg::Write => EventSet::writable(),