From 8ed45bc1106913a5c5cfb6a443592a374f1ce6f6 Mon Sep 17 00:00:00 2001 From: Danny Browning Date: Sat, 23 Nov 2019 11:10:14 -0700 Subject: [PATCH] More logging --- src/compat.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compat.rs b/src/compat.rs index e6ad9cc..c2e8b68 100644 --- a/src/compat.rs +++ b/src/compat.rs @@ -46,7 +46,8 @@ where unsafe { if !self.context.0 { //was called by start_send without context - return Poll::Pending; + debug!("start_send without context"); + return Poll::Pending } assert!(!self.context.1.is_null()); let waker = &mut *(self.context.1 as *mut _); @@ -121,7 +122,10 @@ where pub(crate) fn cvt(r: Result) -> Poll> { match r { Ok(v) => Poll::Ready(Ok(v)), - Err(WsError::Io(ref e)) if e.kind() == std::io::ErrorKind::WouldBlock => Poll::Pending, + Err(WsError::Io(ref e)) if e.kind() == std::io::ErrorKind::WouldBlock => { + trace!("WouldBlock"); + Poll::Pending + }, Err(e) => Poll::Ready(Err(e)), } }