Skip to content

Commit

Permalink
trigger CI to address dead lock
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Apr 28, 2021
1 parent d69a2fa commit 90e3483
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/shadowsocks-service/src/server/udprelay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,10 @@ impl UdpAssociationContext {
let mut buffer = [0u8; MAXIMUM_UDP_PAYLOAD_SIZE];
loop {
let (n, addr) = match outbound.recv_from(&mut buffer).await {
Ok((n, addr)) => {
trace!("udp relay {} <- {} received {} bytes", self.peer_addr, addr, n);
Ok(r) => {
// Keep association alive in map
let _ = self.assoc_map.lock().await.get(&self.peer_addr);
(n, addr)
r
}
Err(err) => {
error!(
Expand All @@ -430,6 +429,8 @@ impl UdpAssociationContext {
}
};

trace!("udp relay {} <- {} received {} bytes", self.peer_addr, addr, n);

let data = &buffer[..n];

let target_addr = match self.target_cache.lock().await.get(&addr) {
Expand Down

0 comments on commit 90e3483

Please sign in to comment.