File tree Expand file tree Collapse file tree
quic/s2n-quic-core/src/crypto/tls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ impl<S: tls::Session> tls::Session for OffloadSession<S> {
290290 }
291291 Err ( _) => {
292292 // For whatever reason the TLS task was cancelled. We cannot continue the handshake.
293- return Poll :: Ready ( Err ( transport :: Error :: from ( tls :: Error :: HANDSHAKE_FAILURE ) ) ) ;
293+ return Poll :: Ready ( Err ( TLS_TASK_CANCELLED ) ) ;
294294 }
295295 } ,
296296 Poll :: Pending => ( ) ,
@@ -333,7 +333,7 @@ impl<S: tls::Session> tls::Session for OffloadSession<S> {
333333 }
334334 Err ( _) => {
335335 // For whatever reason the TLS task was cancelled. We cannot continue the handshake.
336- return Poll :: Ready ( Err ( transport :: Error :: from ( tls :: Error :: HANDSHAKE_FAILURE ) ) ) ;
336+ return Poll :: Ready ( Err ( TLS_TASK_CANCELLED ) ) ;
337337 }
338338 } ,
339339 Poll :: Pending => ( ) ,
@@ -365,6 +365,9 @@ struct AllowedToSend {
365365const SLICE_ERROR : crate :: transport:: Error =
366366 crate :: transport:: Error :: INTERNAL_ERROR . with_reason ( "Slice is full" ) ;
367367
368+ const TLS_TASK_CANCELLED : crate :: transport:: Error =
369+ crate :: transport:: Error :: INTERNAL_ERROR . with_reason ( "TLS task cancelled" ) ;
370+
368371#[ derive( Debug ) ]
369372struct RemoteContext < ' a , Request , H > {
370373 send_to_quic : SendSlice < ' a , Request > ,
You can’t perform that action at this time.
0 commit comments