Skip to content

Commit 53ddb3b

Browse files
committed
enlarge min UDP relay timeout
1 parent e762723 commit 53ddb3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/jconf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define MAX_CONF_SIZE 16 * 1024
2727
#define MAX_DNS_NUM 4
2828
#define MAX_CONNECT_TIMEOUT 10
29-
#define MAX_UDP_TIMEOUT 60
29+
#define MIN_UDP_TIMEOUT 60
3030

3131
typedef struct {
3232
char *host;

src/udprelay.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ int init_udprelay(const char *server_host, const char *server_port,
12041204
#ifdef UDPRELAY_REMOTE
12051205
server_ctx->loop = loop;
12061206
#endif
1207-
server_ctx->timeout = min(timeout, MAX_UDP_TIMEOUT);
1207+
server_ctx->timeout = max(timeout, MIN_UDP_TIMEOUT);
12081208
server_ctx->method = method;
12091209
server_ctx->iface = iface;
12101210
server_ctx->conn_cache = conn_cache;

0 commit comments

Comments
 (0)