diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-19 10:09:32 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-19 10:09:32 +0100 |
| commit | 656a0bff6fd48ba66cfe8fc7b470380c38afbac2 (patch) | |
| tree | a89f0545050bf6672936c6e7ea3e2b0e5c5561f2 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | ef085483b2ef54195e16f282330a3c204e3227b6 (diff) | |
| parent | d57dcf22452db4990aa2cdece3eb798ba98b8330 (diff) | |
Merge remote-tracking branch 'upstream/master' into network-rewrite
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 2f60d01a9..afa3721b8 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -95,12 +95,6 @@ namespace Emby.Server.Implementations.Session _deviceManager.DeviceOptionsUpdated += OnDeviceManagerDeviceOptionsUpdated; } - /// <inheritdoc /> - public event EventHandler<GenericEventArgs<AuthenticationRequest>> AuthenticationFailed; - - /// <inheritdoc /> - public event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded; - /// <summary> /// Occurs when playback has started. /// </summary> @@ -1468,7 +1462,7 @@ namespace Emby.Server.Implementations.Session if (user is null) { - AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request)); + await _eventManager.PublishAsync(new GenericEventArgs<AuthenticationRequest>(request)).ConfigureAwait(false); throw new AuthenticationException("Invalid username or password entered."); } @@ -1504,8 +1498,7 @@ namespace Emby.Server.Implementations.Session ServerId = _appHost.SystemId }; - AuthenticationSucceeded?.Invoke(this, new GenericEventArgs<AuthenticationResult>(returnResult)); - + await _eventManager.PublishAsync(new GenericEventArgs<AuthenticationResult>(returnResult)).ConfigureAwait(false); return returnResult; } |
