]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NetReader.pm
net_reader: set IMAPClient Keepalive flag late
[public-inbox.git] / lib / PublicInbox / NetReader.pm
index b5d14f137d381d62f05b916b94acc519d88308af..9faa362c397acc5c110ac6271090b161f92a1bf2 100644 (file)
@@ -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';