* [pve-devel] [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client
[not found] <20250226225126.346918-1-admin@truthsolo.net>
@ 2025-02-26 22:51 ` Rob Rozestraten via pve-devel
2025-02-27 9:35 ` Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Rob Rozestraten via pve-devel @ 2025-02-26 22:51 UTC (permalink / raw)
To: pve-devel; +Cc: Rob Rozestraten
[-- Attachment #1: Type: message/rfc822, Size: 3694 bytes --]
From: Rob Rozestraten <admin@truthsolo.net>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client
Date: Wed, 26 Feb 2025 22:51:39 +0000
Message-ID: <20250226225126.346918-2-admin@truthsolo.net>
Signed-off-by: Rob Rozestraten <admin@truthsolo.net>
---
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 8a52836..771b153 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -141,6 +141,7 @@ sub client_do_disconnect {
my $shutdown_hdl = sub {
my $hdl = shift;
+ $hdl->stoptls() if $hdl->{tls};
shutdown($hdl->{fh}, 1);
# clear all handlers
$hdl->on_drain(undef);
--
2.48.1
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client
2025-02-26 22:51 ` [pve-devel] [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client Rob Rozestraten via pve-devel
@ 2025-02-27 9:35 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-02-27 9:35 UTC (permalink / raw)
To: Proxmox VE development discussion
> Rob Rozestraten via pve-devel <pve-devel@lists.proxmox.com> hat am 26.02.2025 23:51 CET geschrieben:
Hi (and thanks for your patch)!
A little bit of analysis of *why* this is needed and okay would be great to have here in the commit message ;)
If I read the docs right, this could block (would that be an issue here?) and could potentially destroy the handle (so that might need to be rechecked afterwards to prevent spurious warnings?)
what happens if we initiate the teardown, and the client never acks it?
> Signed-off-by: Rob Rozestraten <admin@truthsolo.net>
> ---
> 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 8a52836..771b153 100644
> --- a/src/PVE/APIServer/AnyEvent.pm
> +++ b/src/PVE/APIServer/AnyEvent.pm
> @@ -141,6 +141,7 @@ sub client_do_disconnect {
> my $shutdown_hdl = sub {
> my $hdl = shift;
>
> + $hdl->stoptls() if $hdl->{tls};
nit: the if is not needed, as `stoptls` only does anything anyway if $hdl has a FH and is a TLS-enabled handle ;)
> shutdown($hdl->{fh}, 1);
> # clear all handlers
> $hdl->on_drain(undef);
> --
> 2.48.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-27 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20250226225126.346918-1-admin@truthsolo.net>
2025-02-26 22:51 ` [pve-devel] [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client Rob Rozestraten via pve-devel
2025-02-27 9:35 ` Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal