Browse Source

refine UDP timeout

pull/261/head
Max Lv 9 years ago
parent
commit
223b8bcd68
2 changed files with 2 additions and 1 deletions
  1. 1
      src/jconf.h
  2. 2
      src/udprelay.c

1
src/jconf.h

@ -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;

2
src/udprelay.c

@ -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;

Loading…
Cancel
Save