mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-05-01 19:17:17 +00:00
fix #3807: don't attempt response on closed handle
if a client closes the connection while the API server is waiting/stalling here, the handle will disappear, and sending a response is no longer possible. (this issue is only cosmetic, but if such clients are a regular occurrence it might get quite noisy in the logs) Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
baf8c8dc0d
commit
e12e46c979
@ -361,6 +361,7 @@ sub response {
|
||||
} elsif ($delay && $delay > 0) {
|
||||
my $w; $w = AnyEvent->timer(after => $delay, cb => sub {
|
||||
undef $w; # delete reference
|
||||
return if !$reqstate->{hdl}; # already disconnected
|
||||
$reqstate->{hdl}->push_write($res);
|
||||
$self->finish_response($reqstate);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user