More logging

pull/3/head
Danny Browning 5 years ago committed by Sebastian Dröge
parent eb2c63ee73
commit 8ed45bc110
  1. 8
      src/compat.rs

@ -46,7 +46,8 @@ where
unsafe { unsafe {
if !self.context.0 { if !self.context.0 {
//was called by start_send without context //was called by start_send without context
return Poll::Pending; debug!("start_send without context");
return Poll::Pending
} }
assert!(!self.context.1.is_null()); assert!(!self.context.1.is_null());
let waker = &mut *(self.context.1 as *mut _); let waker = &mut *(self.context.1 as *mut _);
@ -121,7 +122,10 @@ where
pub(crate) fn cvt<T>(r: Result<T, WsError>) -> Poll<Result<T, WsError>> { pub(crate) fn cvt<T>(r: Result<T, WsError>) -> Poll<Result<T, WsError>> {
match r { match r {
Ok(v) => Poll::Ready(Ok(v)), 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)), Err(e) => Poll::Ready(Err(e)),
} }
} }

Loading…
Cancel
Save