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 {
414
414
let mut buffer = [ 0u8 ; MAXIMUM_UDP_PAYLOAD_SIZE ] ;
415
415
loop {
416
416
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) => {
419
418
// Keep association alive in map
420
419
let _ = self . assoc_map . lock ( ) . await . get ( & self . peer_addr ) ;
421
- ( n , addr )
420
+ r
422
421
}
423
422
Err ( err) => {
424
423
error ! (
@@ -430,6 +429,8 @@ impl UdpAssociationContext {
430
429
}
431
430
} ;
432
431
432
+ trace ! ( "udp relay {} <- {} received {} bytes" , self . peer_addr, addr, n) ;
433
+
433
434
let data = & buffer[ ..n] ;
434
435
435
436
let target_addr = match self . target_cache . lock ( ) . await . get ( & addr) {
You can’t perform that action at this time.
0 commit comments