[pbs-devel] applied: [PATCH proxmox v2] fix #5868: rest-server: connection: fix busy waiting on closed connections pre tls

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 14 15:21:45 CET 2024


Am 13.11.24 um 11:39 schrieb Dominik Csapak:
> when a connection is closed before we have enough data to determine
> if it's tls or not, the socket stays in a readable state.
> 
> Sadly, the tokio timeout we use here gets starved by the async_io
> callback.
> 
> To fix this, save the amount of bytes peek returned and if they did not
> change between invocations of the callback, we assume that the
> connection was closed and exit with an error.
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> changes from v1:
> * removed leftover unrelated test code
> * fixed up the commit message with the bug #
> 
>  proxmox-rest-server/src/connection.rs | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
>

applied this as stop-gap, thanks!

Like I mentioned off-list, I changed the error to ConnectionAborted and reworded
the commit message a bit.




More information about the pbs-devel mailing list