enlarge min UDP relay timeout

This commit is contained in:
Max Lv
2015-07-14 21:05:46 +08:00
parent e762723fc2
commit 53ddb3b4d2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
#define MAX_CONF_SIZE 16 * 1024
#define MAX_DNS_NUM 4
#define MAX_CONNECT_TIMEOUT 10
#define MAX_UDP_TIMEOUT 60
#define MIN_UDP_TIMEOUT 60
typedef struct {
char *host;
+1 -1
View File
@@ -1204,7 +1204,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_UDP_TIMEOUT);
server_ctx->timeout = max(timeout, MIN_UDP_TIMEOUT);
server_ctx->method = method;
server_ctx->iface = iface;
server_ctx->conn_cache = conn_cache;