File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ impl Server {
157
157
158
158
self . do_start ( incoming) . await
159
159
}
160
+ // It seems that we can use UnixStream to represent both UnixStream and VsockStream.
161
+ // Whatever, we keep it for now for the compatibility and vsock-specific features maybe
162
+ // used in the future.
160
163
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
161
164
Some ( Domain :: Vsock ) => {
162
165
let incoming = unsafe { VsockListener :: from_raw_fd ( listenfd) . incoming ( ) } ;
@@ -613,11 +616,7 @@ impl HandlerContext {
613
616
} ) ?;
614
617
}
615
618
task. await
616
- . unwrap_or_else ( |e| {
617
- Err ( Error :: Others ( format ! (
618
- "stream {path} task got error {e:?}"
619
- ) ) )
620
- } )
619
+ . unwrap_or_else ( |e| Err ( Error :: Others ( format ! ( "stream {path} task got error {e:?}" ) ) ) )
621
620
. map_err ( |e| get_status ( Code :: UNKNOWN , e) )
622
621
}
623
622
You can’t perform that action at this time.
0 commit comments