]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Use a smaller idle timeout value for client than for server.
authorTimo Sirainen <tss@iki.fi>
Wed, 9 Mar 2011 17:02:42 +0000 (19:02 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 9 Mar 2011 17:02:42 +0000 (19:02 +0200)
src/dsync/dsync-proxy-client.c
src/dsync/dsync-proxy-server.c
src/dsync/dsync-proxy.h

index da31c1642de3db085b3da42cb8ac7676dedf29b2..fb18b2f1d633aef6f104dbe880794aaf10a120f8 100644 (file)
@@ -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);
index ad09e6ad6edcfeaa7b5842e98814cae096fef908..f1df5159f20f4b03f8d020184dab8564af1731ce 100644 (file)
@@ -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);
index f05c2355bc168e4261c94107bf7dc59c487b0a67..063a9f3369312fcb45694d1b8d0aec80e52fb97b 100644 (file)
@@ -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"