about summary refs log tree commit homepage
path: root/lib/PublicInbox/NetReader.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-09 05:24:59 +0000
committerEric Wong <e@80x24.org>2021-09-09 05:42:55 +0000
commitbe9e047b80f1a91492efcf92bb449d789b20edf5 (patch)
treef85bf7c316e0b7304334f65f189fabf521f6ff64 /lib/PublicInbox/NetReader.pm
parentfb4b16193d0d839a0869b2cf2295b7384ef5f1e3 (diff)
downloadpublic-inbox-be9e047b80f1a91492efcf92bb449d789b20edf5.tar.gz
Since we always enable SO_KEEPALIVE unconditionally, having it
in {mic_arg} leads to unnecessary IPC overhead and memory use.
Diffstat (limited to 'lib/PublicInbox/NetReader.pm')
-rw-r--r--lib/PublicInbox/NetReader.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index b5d14f13..9faa362c 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -51,7 +51,7 @@ sub mic_new ($$$$) {
                 $socks{Socket} = IO::Socket::Socks->new(%opt) or die
                         "E: <$$uri> ".eval('$IO::Socket::Socks::SOCKS_ERROR');
         }
-        PublicInbox::IMAPClient->new(%$mic_arg, %socks);
+        PublicInbox::IMAPClient->new(%$mic_arg, %socks, Keepalive => 1);
 }
 
 sub auth_anon_cb { '' }; # for Mail::IMAPClient::Authcallback
@@ -76,7 +76,6 @@ sub mic_for ($$$$) { # mic = Mail::IMAPClient
                 Port => $uri->port,
                 Server => $host,
                 Ssl => $uri->scheme eq 'imaps',
-                Keepalive => 1, # SO_KEEPALIVE
                 %$common, # may set Starttls, Compress, Debug ....
         };
         $mic_arg->{Ssl} = 1 if $uri->scheme eq 'imaps';