diff options
author | Eric Wong <e@80x24.org> | 2023-09-24 20:19:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-24 23:14:20 +0000 |
commit | 1afb6f5133444bc53db047574d5142f85dfc2218 (patch) | |
tree | 3cb40ac3a069e76ee50dd90e508cb6d0431a0904 /lib/PublicInbox/CmdIPC4.pm | |
parent | 9852f593c5e86ffad77b2558f5028fd8f13f2c21 (diff) | |
download | public-inbox-1afb6f5133444bc53db047574d5142f85dfc2218.tar.gz |
Handling this should be done at the lowest levels possible; so away from higher-level lei code.
Diffstat (limited to 'lib/PublicInbox/CmdIPC4.pm')
-rw-r--r-- | lib/PublicInbox/CmdIPC4.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/CmdIPC4.pm b/lib/PublicInbox/CmdIPC4.pm index 99890244..4bc4c729 100644 --- a/lib/PublicInbox/CmdIPC4.pm +++ b/lib/PublicInbox/CmdIPC4.pm @@ -31,7 +31,10 @@ no warnings 'once'; *recv_cmd4 = sub ($$$) { my ($s, undef, $len) = @_; # $_[1] = destination buffer my $mh = Socket::MsgHdr->new(buflen => $len, controllen => 256); - my $r = Socket::MsgHdr::recvmsg($s, $mh, 0) // return (undef); + my $r = Socket::MsgHdr::recvmsg($s, $mh, 0) // do { + $_[1] = ''; + return (undef); + }; $_[1] = $mh->buf; return () if $r == 0; my (undef, undef, $data) = $mh->cmsghdr; |