avoid warnings when clients disconnects early

This commit is contained in:
Dietmar Maurer 2017-01-20 11:22:40 +01:00
parent 84df857fba
commit 133e058609

View File

@ -146,10 +146,11 @@ sub client_do_disconnect {
sub finish_response {
my ($self, $reqstate) = @_;
my $hdl = $reqstate->{hdl};
cleanup_reqstate($reqstate);
my $hdl = $reqstate->{hdl};
return if !$hdl; # already disconnected
if (!$self->{end_loop} && $reqstate->{keep_alive} > 0) {
# print "KEEPALIVE $reqstate->{keep_alive}\n" if $self->{debug};
$hdl->on_read(sub {