* [pve-devel] [PATCH http-server] fix #3807: don't attempt response on closed handle
@ 2021-12-29 11:15 Fabian Grünbichler
2022-01-13 12:11 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2021-12-29 11:15 UTC (permalink / raw)
To: pve-devel
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>
---
src/PVE/APIServer/AnyEvent.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
index f0305b3..4a99c77 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -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);
});
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH http-server] fix #3807: don't attempt response on closed handle
2021-12-29 11:15 [pve-devel] [PATCH http-server] fix #3807: don't attempt response on closed handle Fabian Grünbichler
@ 2022-01-13 12:11 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-01-13 12:11 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
On 29.12.21 12:15, Fabian Grünbichler wrote:
> 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>
> ---
> src/PVE/APIServer/AnyEvent.pm | 1 +
> 1 file changed, 1 insertion(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-13 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 11:15 [pve-devel] [PATCH http-server] fix #3807: don't attempt response on closed handle Fabian Grünbichler
2022-01-13 12:11 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox