From 8283e51597fe486ff1cab7277eecbfb14e60d463 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 14 Jul 2015 09:08:29 +0800 Subject: [PATCH] enlarge the default timeout --- src/local.c | 2 +- src/redir.c | 2 +- src/tunnel.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/local.c b/src/local.c index abd12f38..ab69115a 100644 --- a/src/local.c +++ b/src/local.c @@ -1023,7 +1023,7 @@ int main(int argc, char **argv) } if (timeout == NULL) { - timeout = "10"; + timeout = "60"; } if (local_addr == NULL) { diff --git a/src/redir.c b/src/redir.c index f342c5c3..3fa2aee9 100644 --- a/src/redir.c +++ b/src/redir.c @@ -708,7 +708,7 @@ int main(int argc, char **argv) } if (timeout == NULL) { - timeout = "10"; + timeout = "60"; } if (local_addr == NULL) { diff --git a/src/tunnel.c b/src/tunnel.c index 88484952..cd5246d9 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -481,9 +481,7 @@ static struct remote * new_remote(int fd, int timeout) ev_io_init(&remote->recv_ctx->io, remote_recv_cb, fd, EV_READ); ev_io_init(&remote->send_ctx->io, remote_send_cb, fd, EV_WRITE); ev_timer_init(&remote->send_ctx->watcher, remote_timeout_cb, - min(MAX_CONNECT_TIMEOUT, - timeout), - 0); + min(MAX_CONNECT_TIMEOUT, timeout), 0); remote->recv_ctx->remote = remote; remote->recv_ctx->connected = 0; remote->send_ctx->remote = remote; @@ -754,7 +752,7 @@ int main(int argc, char **argv) } if (timeout == NULL) { - timeout = "10"; + timeout = "60"; } if (local_addr == NULL) {