diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 7499474..9b18ee2 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -141,11 +141,13 @@ sub client_do_disconnect { my $shutdown_hdl = sub { my $hdl = shift; - shutdown($hdl->{fh}, 1); # clear all handlers $hdl->on_drain(undef); $hdl->on_read(undef); $hdl->on_eof(undef); + + $hdl->stoptls(); + shutdown($hdl->{fh}, 1); }; if (my $proxyhdl = delete $reqstate->{proxyhdl}) {