mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 11:43:50 +00:00
Fix "ERROR: [udp] remote_recv_bind: Address already in use" when multiple reuse_port-enabled ss-redir instances are listening on the same address
This commit is contained in:
@@ -869,6 +869,11 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
|
||||
close(src_fd);
|
||||
goto CLEAN_UP;
|
||||
}
|
||||
if (reuse_port) {
|
||||
if (set_reuseport(src_fd) != 0) {
|
||||
ERROR("[udp] remote_recv port_reuse");
|
||||
}
|
||||
}
|
||||
#ifdef IP_TOS
|
||||
// Set QoS flag
|
||||
int tos = 46 << 2;
|
||||
|
||||
Reference in New Issue
Block a user