File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
crates/shadowsocks-service/src/server Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -414,11 +414,10 @@ impl UdpAssociationContext {
414414 let mut buffer = [ 0u8 ; MAXIMUM_UDP_PAYLOAD_SIZE ] ;
415415 loop {
416416 let ( n, addr) = match outbound. recv_from ( & mut buffer) . await {
417- Ok ( ( n, addr) ) => {
418- trace ! ( "udp relay {} <- {} received {} bytes" , self . peer_addr, addr, n) ;
417+ Ok ( r) => {
419418 // Keep association alive in map
420419 let _ = self . assoc_map . lock ( ) . await . get ( & self . peer_addr ) ;
421- ( n , addr )
420+ r
422421 }
423422 Err ( err) => {
424423 error ! (
@@ -430,6 +429,8 @@ impl UdpAssociationContext {
430429 }
431430 } ;
432431
432+ trace ! ( "udp relay {} <- {} received {} bytes" , self . peer_addr, addr, n) ;
433+
433434 let data = & buffer[ ..n] ;
434435
435436 let target_addr = match self . target_cache . lock ( ) . await . get ( & addr) {
You can’t perform that action at this time.
0 commit comments