changeset 2927:6e2129a4a595 HEAD

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).
author Timo Sirainen <tss@iki.fi>
date Sat, 04 Dec 2004 20:51:26 +0200
parents c035583b4839
children 3470bb04fb57
files src/pop3/client.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/pop3/client.c	Fri Dec 03 06:58:37 2004 +0200
+++ b/src/pop3/client.c	Sat Dec 04 20:51:26 2004 +0200
@@ -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 >=