aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-09-17 22:05:09 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-09-21 01:01:25 +0200
commit612b9e2102e1907709dde325f91d5fdf70ed2534 (patch)
tree007d69ddd0998924ce81493b2a49a9076d8f020b /interimap
parent683a3973a32ee3618824d08ed7ee6cfc7ee9ab02 (diff)
Use TCP keepalive to detect dead peers.
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap1
1 files changed, 1 insertions, 0 deletions
diff --git a/interimap b/interimap
index 45a6643..54ae0aa 100755
--- a/interimap
+++ b/interimap
@@ -248,6 +248,7 @@ foreach my $name (qw/local remote/) {
$config{name} = $name;
$config{'logger-fd'} = $LOGGER_FD if defined $LOGGER_FD;
$config{'compress'} //= ($name eq 'local' ? 0 : 1);
+ $config{keepalive} = 1 if $CONFIG{watch} and $config{type} ne 'tunnel';
$IMAP->{$name} = { client => Net::IMAP::InterIMAP::->new(%config) };
my $client = $IMAP->{$name}->{client};