File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -894,6 +894,23 @@ impl Session {
894894 }
895895 }
896896 }
897+ Some ( & msg:: CHANNEL_OPEN_FAILURE ) => {
898+ debug ! ( "Channel open failed." ) ;
899+ let mut buf_pos = buf. reader ( 1 ) ;
900+ let channel_num = ChannelId ( buf_pos. read_u32 ( ) . map_err ( crate :: Error :: from) ?) ;
901+ let reason =
902+ ChannelOpenFailure :: from_u32 ( buf_pos. read_u32 ( ) . map_err ( crate :: Error :: from) ?)
903+ . unwrap_or ( ChannelOpenFailure :: Unknown ) ;
904+ let description =
905+ std:: str:: from_utf8 ( buf_pos. read_string ( ) . map_err ( crate :: Error :: from) ?)
906+ . map_err ( crate :: Error :: from) ?;
907+ let language_tag =
908+ std:: str:: from_utf8 ( buf_pos. read_string ( ) . map_err ( crate :: Error :: from) ?)
909+ . map_err ( crate :: Error :: from) ?;
910+
911+ self . channel_open_failure ( channel_num, reason, description, language_tag) ;
912+ Ok ( ( handler, self ) )
913+ }
897914 m => {
898915 debug ! ( "unknown message received: {:?}" , m) ;
899916 Ok ( ( handler, self ) )
You can’t perform that action at this time.
0 commit comments