]> Sergey Matveev's repositories - public-inbox.git/commitdiff
watch: use net_reader->mic_new wrapper for SOCKS+TLS
authorEric Wong <e@80x24.org>
Sun, 19 Sep 2021 12:50:31 +0000 (12:50 +0000)
committerEric Wong <e@80x24.org>
Sun, 19 Sep 2021 19:53:02 +0000 (19:53 +0000)
This brings -watch up to feature parity with lei with
SOCKS support.

lib/PublicInbox/Watch.pm

index 43ee07143d664a28bffd7513a30d96b3d403e908..387eb6d252e9a0f329b1fcbaef0ec81a8020a70e 100644 (file)
@@ -358,7 +358,8 @@ sub watch_imap_idle_1 ($$$) {
        my $mic;
        local $0 = $uri->mailbox." $sec";
        until ($self->{quit}) {
        my $mic;
        local $0 = $uri->mailbox." $sec";
        until ($self->{quit}) {
-               $mic //= PublicInbox::IMAPClient->new(%$mic_arg,Keepalive => 1);
+               $mic //= PublicInbox::NetReader::mic_new(
+                                       $self, $mic_arg, $sec, $uri);
                my $err;
                if ($mic && $mic->IsConnected) {
                        local $self->{mics_cached}->{$sec} = $mic;
                my $err;
                if ($mic && $mic->IsConnected) {
                        local $self->{mics_cached}->{$sec} = $mic;