File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -535,21 +535,21 @@ impl MagicSock {
535
535
}
536
536
}
537
537
538
- let udp_pending = udp_addr. is_some ( )
539
- && udp_error
540
- . as_ref ( )
541
- . map ( |err| err. kind ( ) == io:: ErrorKind :: WouldBlock )
542
- . unwrap_or_default ( ) ;
538
+ let udp_pending = udp_error
539
+ . as_ref ( )
540
+ . map ( |err| err. kind ( ) == io:: ErrorKind :: WouldBlock )
541
+ . unwrap_or_default ( ) ;
543
542
544
- let relay_pending = relay_url. is_some ( )
545
- && relay_error
546
- . as_ref ( )
547
- . map ( |err| err. kind ( ) == io:: ErrorKind :: WouldBlock )
548
- . unwrap_or_default ( ) ;
543
+ let relay_pending = relay_error
544
+ . as_ref ( )
545
+ . map ( |err| err. kind ( ) == io:: ErrorKind :: WouldBlock )
546
+ . unwrap_or_default ( ) ;
549
547
550
- let has_path = udp_addr. is_some ( ) || relay_url. is_some ( ) ;
548
+ let udp_path = udp_addr. is_some ( ) ;
549
+ let relay_path = relay_url. is_some ( ) ;
550
+ let has_path = udp_path || relay_path;
551
551
552
- if udp_pending && relay_pending && has_path {
552
+ if ( udp_pending || !udp_path ) && ( relay_pending || !relay_path ) && has_path {
553
553
// Handle backpressure.
554
554
inc ! ( MagicsockMetrics , send_pending) ;
555
555
Err ( io:: Error :: new ( io:: ErrorKind :: WouldBlock , "pending" ) )
You can’t perform that action at this time.
0 commit comments