summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-01-12 10:19:38 +0100
committerYorhel <git@yorhel.nl>2018-01-12 10:19:40 +0100
commit451375a72e0937791cf6a4dcb26e83f386a6afbd (patch)
treef63defc81b3b3cdae90ac439fd0b479a4921fb77
parent5d11dad2ab83429eb68553e2b970f7509cc61473 (diff)
vndb-dev-server.pl: Properly propagate connection close
Should fix https://vndb.org/t9425.11
-rwxr-xr-xutil/vndb-dev-server.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/vndb-dev-server.pl b/util/vndb-dev-server.pl
index c2cf5103..a712d094 100755
--- a/util/vndb-dev-server.pl
+++ b/util/vndb-dev-server.pl
@@ -70,13 +70,13 @@ sub pipe_fhs {
$a = AnyEvent::Handle->new(
fh => $a_fh,
on_read => sub { $b->push_write($a->{rbuf}); $a->{rbuf} = '' },
- on_error => sub { $done->end if $_[1] },
+ on_error => sub { if($_[1]) { $b->push_shutdown; $done->end } },
);
$done->begin;
$b = AnyEvent::Handle->new(
fh => $b_fh,
on_read => sub { $a->push_write($b->{rbuf}); $b->{rbuf} = '' },
- on_error => sub { $done->end if $_[1] },
+ on_error => sub { if($_[1]) { $a->push_shutdown; $done->end } },
);
$done->recv;
}