diff options
| author | crobibero <cody@robibe.ro> | 2020-11-13 09:41:18 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-13 09:41:18 -0700 |
| commit | 7bf320922c095b67293c05b8d2e0ed79f1db78d7 (patch) | |
| tree | 2f49f41b3c3c66d24f55d1c9faa1639dadc022f1 /Emby.Server.Implementations/Session/WebSocketController.cs | |
| parent | d5e2369dd6ac308e518a5a36a744a1a2dac45f70 (diff) | |
Fix nullability errors in Emby.Server.Implementations
Diffstat (limited to 'Emby.Server.Implementations/Session/WebSocketController.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/WebSocketController.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.cs index b986ffa1c..7559ccb78 100644 --- a/Emby.Server.Implementations/Session/WebSocketController.cs +++ b/Emby.Server.Implementations/Session/WebSocketController.cs @@ -55,8 +55,13 @@ namespace Emby.Server.Implementations.Session connection.Closed += OnConnectionClosed; } - private void OnConnectionClosed(object sender, EventArgs e) + private void OnConnectionClosed(object? sender, EventArgs e) { + if (sender == null) + { + throw new NullReferenceException(nameof(sender)); + } + var connection = (IWebSocketConnection)sender; _logger.LogDebug("Removing websocket from session {Session}", _session.Id); _sockets.Remove(connection); |
