From 358f61264330da1e510c07868372c02dfa8f6b2c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Jun 2020 18:09:06 +0000 Subject: [PATCH] ds: flush_write: early return on closed socket This quiets warnings from IMAP::fetch_blob (called via long_response) failing to access `$self->{ibx}->git' because ->{ibx} gets deleted by IMAP::close. --- lib/PublicInbox/DS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index b7753e1a..aa65b2d3 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -421,8 +421,8 @@ sub epbit ($$) { # (sock, default) # returns 1 if done, 0 if incomplete sub flush_write ($) { my ($self) = @_; + my $sock = $self->{sock} or return; my $wbuf = $self->{wbuf} or return 1; - my $sock = $self->{sock}; next_buf: while (my $bref = $wbuf->[0]) { -- 2.44.0