mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-22 16:14:20 -05:00
[PR #4127] [MERGED] Prevent generating an error during ws close #20215
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/4127
Author: @BlackDex
Created: 12/4/2023
Status: ✅ Merged
Merged: 12/4/2023
Merged by: @dani-garcia
Base:
main← Head:fix-websocket-close-issue📝 Commits (1)
a8d664ePrevent generating an error during ws close📊 Changes
1 file changed (+10 additions, -0 deletions)
View changed files
📝
src/api/notifications.rs(+10 -0)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.