File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -104,18 +104,15 @@ where
104
104
let r = match r {
105
105
Ok ( r) => r,
106
106
Err ( nix:: errno:: Errno :: EAGAIN ) => {
107
- // this time don't `wake_by_ref` on purpose, but try to to clear readiness
108
- tracing:: trace!( "KtlsStream::poll_read, got EAGAIN" ) ;
109
- match this. inner . poll_read_ready ( cx) {
110
- task:: Poll :: Ready ( s) => {
111
- tracing:: trace!( "KtlsStream::poll_read, got Ready, {s:#?}" )
112
- }
113
- task:: Poll :: Pending => {
114
- tracing:: trace!( "KtlsStream::poll_read, got Pending" )
107
+ // this time don't `wake_by_ref` on purpose, but clear readiness by calling
108
+ // poll_read, knowing it'll fail
109
+ tracing:: trace!( "KtlsStream::poll_read, recvmsg gave us EAGAIN/EWOULDBLOCK" ) ;
110
+ match this. inner . poll_read ( cx, buf) {
111
+ task:: Poll :: Ready ( _) => {
112
+ unreachable ! ( "one of ktls's core assumptions about async I/O didn't hold" )
115
113
}
114
+ task:: Poll :: Pending => return task:: Poll :: Pending ,
116
115
}
117
- cx. waker ( ) . wake_by_ref ( ) ;
118
- return task:: Poll :: Pending ;
119
116
}
120
117
Err ( e) => {
121
118
tracing:: trace!( ?e, "recvmsg failed" ) ;
You can’t perform that action at this time.
0 commit comments