[dovecot-cvs] dovecot/src/pop3 client.c,1.43,1.44

cras at dovecot.org cras at dovecot.org
Sat Dec 4 20:51:29 EET 2004


Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv11118

Modified Files:
	client.c 
Log Message:
Timeout changes. Default idle timeout is now 10 minutes instead of 30
minutes. Also before if client didn't read our output we didn't timeout it
until after 16 hours (should have been one minute, changed it to 10min as
well).



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- client.c	20 Oct 2004 17:07:33 -0000	1.43
+++ client.c	4 Dec 2004 18:51:26 -0000	1.44
@@ -20,14 +20,14 @@
    size has dropped to half of it, start reading input again. */
 #define OUTBUF_THROTTLE_SIZE 4096
 
-/* If we can't send anything for a minute, disconnect the client */
-#define CLIENT_OUTPUT_TIMEOUT (60*1000)
+/* If we can't send anything for 10 minutes, disconnect the client */
+#define CLIENT_OUTPUT_TIMEOUT (10*60)
 
 /* Disconnect client when it sends too many bad commands in a row */
 #define CLIENT_MAX_BAD_COMMANDS 20
 
 /* Disconnect client after idling this many seconds */
-#define CLIENT_IDLE_TIMEOUT (60*30)
+#define CLIENT_IDLE_TIMEOUT (10*60)
 
 extern struct mail_storage_callbacks mail_storage_callbacks;
 
@@ -363,8 +363,7 @@
 
 	if (my_client->cmd != NULL) {
 		if (ioloop_time - my_client->last_output >=
-		    CLIENT_OUTPUT_TIMEOUT &&
-		    my_client->last_input < my_client->last_output)
+		    CLIENT_OUTPUT_TIMEOUT)
 			client_destroy(my_client);
 	} else {
 		if (ioloop_time - my_client->last_input >=



More information about the dovecot-cvs mailing list