From: Timo Sirainen Date: Wed, 9 Mar 2011 17:02:42 +0000 (+0200) Subject: dsync: Use a smaller idle timeout value for client than for server. X-Git-Tag: 2.0.12~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36de2c0bc4957e083c5598e0ca97e2965aec7d27;p=thirdparty%2Fdovecot%2Fcore.git dsync: Use a smaller idle timeout value for client than for server. --- diff --git a/src/dsync/dsync-proxy-client.c b/src/dsync/dsync-proxy-client.c index da31c1642d..fb18b2f1d6 100644 --- a/src/dsync/dsync-proxy-client.c +++ b/src/dsync/dsync-proxy-client.c @@ -399,7 +399,7 @@ struct dsync_worker *dsync_worker_init_proxy_client(int fd_in, int fd_out) worker->worker.v = proxy_client_dsync_worker; worker->fd_in = fd_in; worker->fd_out = fd_out; - worker->to = timeout_add(DSYNC_PROXY_TIMEOUT_MSECS, + worker->to = timeout_add(DSYNC_PROXY_CLIENT_TIMEOUT_MSECS, proxy_client_worker_timeout, worker); worker->io = io_add(fd_in, IO_READ, proxy_client_worker_input, worker); worker->input = i_stream_create_fd(fd_in, (size_t)-1, FALSE); diff --git a/src/dsync/dsync-proxy-server.c b/src/dsync/dsync-proxy-server.c index ad09e6ad6e..f1df5159f2 100644 --- a/src/dsync/dsync-proxy-server.c +++ b/src/dsync/dsync-proxy-server.c @@ -172,7 +172,7 @@ dsync_proxy_server_init(int fd_in, int fd_out, struct dsync_worker *worker) server->io = io_add(fd_in, IO_READ, proxy_server_input, server); server->input = i_stream_create_fd(fd_in, (size_t)-1, FALSE); server->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE); - server->to = timeout_add(DSYNC_PROXY_TIMEOUT_MSECS, + server->to = timeout_add(DSYNC_PROXY_SERVER_TIMEOUT_MSECS, dsync_proxy_server_timeout, NULL); o_stream_set_flush_callback(server->output, proxy_server_output, server); diff --git a/src/dsync/dsync-proxy.h b/src/dsync/dsync-proxy.h index f05c2355bc..063a9f3369 100644 --- a/src/dsync/dsync-proxy.h +++ b/src/dsync/dsync-proxy.h @@ -3,7 +3,9 @@ #include "dsync-data.h" -#define DSYNC_PROXY_TIMEOUT_MSECS (15*60*1000) +#define DSYNC_PROXY_CLIENT_TIMEOUT_MSECS (14*60*1000) +#define DSYNC_PROXY_SERVER_TIMEOUT_MSECS (15*60*1000) + #define DSYNC_PROXY_CLIENT_GREETING_LINE "dsync-client\t1" #define DSYNC_PROXY_SERVER_GREETING_LINE "dsync-server\t1"