mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-20 13:03:50 +00:00
refine UDP timeout
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#define MAX_CONF_SIZE 16 * 1024
|
||||
#define MAX_DNS_NUM 4
|
||||
#define MAX_CONNECT_TIMEOUT 10
|
||||
#define MAX_UDP_TIMEOUT 120
|
||||
|
||||
typedef struct {
|
||||
char *host;
|
||||
|
||||
+1
-1
@@ -1006,7 +1006,7 @@ int init_udprelay(const char *server_host, const char *server_port,
|
||||
#ifdef UDPRELAY_REMOTE
|
||||
server_ctx->loop = loop;
|
||||
#endif
|
||||
server_ctx->timeout = min(timeout, MAX_CONNECT_TIMEOUT);
|
||||
server_ctx->timeout = min(timeout, MAX_UDP_TIMEOUT);
|
||||
server_ctx->method = method;
|
||||
server_ctx->iface = iface;
|
||||
server_ctx->conn_cache = conn_cache;
|
||||
|
||||
Reference in New Issue
Block a user