refine UDP timeout

This commit is contained in:
Max Lv
2015-02-09 10:11:59 +08:00
parent a365d66d69
commit 223b8bcd68
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
View File
@@ -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;