From ee8b55e2c88685ccaa7020089a26edbfa84174cf Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 16 Dec 2014 10:59:53 +0800 Subject: [PATCH] limit the timeout of udprelay --- src/udprelay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udprelay.c b/src/udprelay.c index 1b81dbd3..4940ba52 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -914,7 +914,7 @@ int init_udprelay(const char *server_host, const char *server_port, setnonblocking(serverfd); server_ctx = new_server_ctx(serverfd); - server_ctx->timeout = timeout; + server_ctx->timeout = min(timeout, 5); server_ctx->method = method; server_ctx->iface = iface; server_ctx->conn_cache = conn_cache;