Prevent generating an error during ws close #1329

Closed
opened 2026-04-06 01:45:56 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @BlackDex on 12/4/2023

When a WebSocket connection was closing it was sending a message after it was closed already. This generated an error in the logs. While this error didn't harm any of the functionallity of Vaultwarden it isn't nice to see them of course.

This PR Fixes this by catching the close message and breaks the loop at that point. This prevents the _ catch-all from replying the close message back to the client, which was causing the error message.

Fixes #4090

*Originally created by @BlackDex on 12/4/2023* When a WebSocket connection was closing it was sending a message after it was closed already. This generated an error in the logs. While this error didn't harm any of the functionallity of Vaultwarden it isn't nice to see them of course. This PR Fixes this by catching the close message and breaks the loop at that point. This prevents the `_` catch-all from replying the close message back to the client, which was causing the error message. Fixes #4090
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1329