File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -168,13 +168,13 @@ pub async fn io_loop(
168
168
169
169
// Asynchronously wait for an inbound TCP connection
170
170
let retval = listener. accept ( ) ;
171
- let ( stream, addr) = match timeout ( TCP_CLIENT_TIMEOUT , retval) . await ? {
172
- Ok ( ( stream , addr ) ) => ( stream , addr ) ,
173
- Err ( _ ) => {
174
- error ! (
175
- "{} 📵 TCP server: timed out waiting for phone connection, restarting..." ,
176
- NAME
177
- ) ;
171
+ let ( stream, addr) = match timeout ( TCP_CLIENT_TIMEOUT , retval)
172
+ . await
173
+ . map_err ( |e| std :: io :: Error :: other ( e ) )
174
+ {
175
+ Ok ( Ok ( ( stream , addr ) ) ) => ( stream , addr ) ,
176
+ Err ( e ) | Ok ( Err ( e ) ) => {
177
+ error ! ( "{} 📵 TCP server: {}, restarting..." , NAME , e ) ;
178
178
// notify main loop to restart
179
179
need_restart. notify_one ( ) ;
180
180
continue ;
You can’t perform that action at this time.
0 commit comments