File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,20 +84,20 @@ impl Client {
84
84
self . req_tx
85
85
. send ( SendingMessage :: new ( msg) )
86
86
. await
87
- . map_err ( |e | Error :: Others ( format ! ( "Send packet to sender error {e:?}" ) ) ) ?;
87
+ . map_err ( |_ | Error :: LocalClosed ) ?;
88
88
89
89
let result = if timeout_nano == 0 {
90
90
rx. recv ( )
91
91
. await
92
- . ok_or_else ( || Error :: Others ( "Receive packet from receiver error" . to_string ( ) ) ) ?
92
+ . ok_or_else ( || Error :: RemoteClosed ) ?
93
93
} else {
94
94
tokio:: time:: timeout (
95
95
std:: time:: Duration :: from_nanos ( timeout_nano as u64 ) ,
96
96
rx. recv ( ) ,
97
97
)
98
98
. await
99
99
. map_err ( |e| Error :: Others ( format ! ( "Receive packet timeout {e:?}" ) ) ) ?
100
- . ok_or_else ( || Error :: Others ( "Receive packet from receiver error" . to_string ( ) ) ) ?
100
+ . ok_or_else ( || Error :: RemoteClosed ) ?
101
101
} ;
102
102
103
103
let msg = result?;
You can’t perform that action at this time.
0 commit comments