Mercurial > dovecot > core-2.2
changeset 12838:60c5cf26c3dd
dsync: Use a smaller idle timeout value for client than for server.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 09 Mar 2011 19:02:42 +0200 |
parents | 33cd03255c94 |
children | 3b2c301ab31f |
files | src/dsync/dsync-proxy-client.c src/dsync/dsync-proxy-server.c src/dsync/dsync-proxy.h |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-proxy-client.c Mon Mar 07 19:35:09 2011 +0200 +++ b/src/dsync/dsync-proxy-client.c Wed Mar 09 19:02:42 2011 +0200 @@ -399,7 +399,7 @@ 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);
--- a/src/dsync/dsync-proxy-server.c Mon Mar 07 19:35:09 2011 +0200 +++ b/src/dsync/dsync-proxy-server.c Wed Mar 09 19:02:42 2011 +0200 @@ -172,7 +172,7 @@ 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);
--- a/src/dsync/dsync-proxy.h Mon Mar 07 19:35:09 2011 +0200 +++ b/src/dsync/dsync-proxy.h Wed Mar 09 19:02:42 2011 +0200 @@ -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"