From 2e72300b0d571c2b319e0e5c827ddc45f011f964 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 27 May 2018 15:48:21 -0600 Subject: * Add new variable close-connection-timeout, which tells Alpine to close a connection that is having problems being kept alive after the number of seconds configured in this variable, if the connection has not recovered. The default is 0, which means to keep the connection alive and wait for the connection to recover. --- alpine/imap.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'alpine/imap.c') diff --git a/alpine/imap.c b/alpine/imap.c index 48ee3606..54e6b253 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -1259,6 +1259,15 @@ pine_tcptimeout(long int elapsed, long int sincelast, char *host) if(ps_global->noshow_timeout) return(rv); + if(ps_global->can_interrupt + && ps_global->close_connection_timeout > 0L + && elapsed >= (long)ps_global->tcp_query_timeout + && elapsed >= (long)ps_global->close_connection_timeout){ + ps_global->read_bail = 0; + ps_global->user_says_cancel = 1; + return 0; + } + if(!ps_global->ttyo) return(pine_tcptimeout_noscreen(elapsed, sincelast, host)); -- cgit v1.2.3-54-g00ecf