diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-12-26 20:57:46 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-01-13 20:06:08 +0100 |
| commit | 5ca68f9623e414b85ddbda1f97895f1b90bd05e0 (patch) | |
| tree | 8360af78a08b0b84b2a4854e35df1ab5e55f6c80 /MediaBrowser.Controller/Net/IWebSocketConnection.cs | |
| parent | 976459d3e8a8b889cebc2cf281e38b0fbc19c9b9 (diff) | |
Fix nullref exception and added logging
Diffstat (limited to 'MediaBrowser.Controller/Net/IWebSocketConnection.cs')
| -rw-r--r-- | MediaBrowser.Controller/Net/IWebSocketConnection.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/MediaBrowser.Controller/Net/IWebSocketConnection.cs b/MediaBrowser.Controller/Net/IWebSocketConnection.cs index e2a714d5b..d5555884d 100644 --- a/MediaBrowser.Controller/Net/IWebSocketConnection.cs +++ b/MediaBrowser.Controller/Net/IWebSocketConnection.cs @@ -1,3 +1,5 @@ +#nullable enable + using System; using System.Net; using System.Net.WebSockets; @@ -13,7 +15,7 @@ namespace MediaBrowser.Controller.Net /// <summary> /// Occurs when [closed]. /// </summary> - event EventHandler<EventArgs> Closed; + event EventHandler<EventArgs>? Closed; /// <summary> /// Gets the last activity date. @@ -22,22 +24,16 @@ namespace MediaBrowser.Controller.Net DateTime LastActivityDate { get; } /// <summary> - /// Gets or sets the URL. - /// </summary> - /// <value>The URL.</value> - string Url { get; set; } - - /// <summary> /// Gets or sets the query string. /// </summary> /// <value>The query string.</value> - IQueryCollection QueryString { get; set; } + IQueryCollection QueryString { get; } /// <summary> /// Gets or sets the receive action. /// </summary> /// <value>The receive action.</value> - Func<WebSocketMessageInfo, Task> OnReceive { get; set; } + Func<WebSocketMessageInfo, Task>? OnReceive { get; set; } /// <summary> /// Gets the state. @@ -49,7 +45,7 @@ namespace MediaBrowser.Controller.Net /// Gets the remote end point. /// </summary> /// <value>The remote end point.</value> - IPAddress RemoteEndPoint { get; } + IPAddress? RemoteEndPoint { get; } /// <summary> /// Sends a message asynchronously. |
