diff options
| author | crobibero <cody@robibe.ro> | 2020-11-13 18:04:06 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-13 18:04:06 -0700 |
| commit | 73d2cb1c2a3a7cd1a30840a2b52921a3b81c6809 (patch) | |
| tree | 922229602e0dbff30c371e70ed16512fb27eaa1e /Emby.Server.Implementations/Session/WebSocketController.cs | |
| parent | 24ac5cc353dd5b9930d43a5659d97037644fa58a (diff) | |
Updated based on review feedback
Diffstat (limited to 'Emby.Server.Implementations/Session/WebSocketController.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/WebSocketController.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.cs index 5268ea1b9..f9c6a13c6 100644 --- a/Emby.Server.Implementations/Session/WebSocketController.cs +++ b/Emby.Server.Implementations/Session/WebSocketController.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Session private void OnConnectionClosed(object? sender, EventArgs e) { - var connection = sender as IWebSocketConnection ?? throw new ResourceNotFoundException(nameof(sender)); + var connection = sender as IWebSocketConnection ?? throw new ArgumentException($"{nameof(sender)} is not of type {nameof(IWebSocketConnection)}", nameof(sender)); _logger.LogDebug("Removing websocket from session {Session}", _session.Id); _sockets.Remove(connection); connection.Closed -= OnConnectionClosed; |
