added null check to web socket
This commit is contained in:
parent
dcf8e4c4b5
commit
ca492d105e
|
@ -120,7 +120,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
||||||
{
|
{
|
||||||
var endpoint = ctx.Request.RemoteEndPoint.ToString();
|
var endpoint = ctx.Request.RemoteEndPoint.ToString();
|
||||||
var url = ctx.Request.RawUrl;
|
var url = ctx.Request.RawUrl;
|
||||||
var queryString = new NameValueCollection(ctx.Request.QueryString);
|
var queryString = new NameValueCollection(ctx.Request.QueryString ?? new NameValueCollection());
|
||||||
|
|
||||||
var connectingArgs = new WebSocketConnectingEventArgs
|
var connectingArgs = new WebSocketConnectingEventArgs
|
||||||
{
|
{
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager
|
||||||
{
|
{
|
||||||
OnReceive = ProcessWebSocketMessageReceived,
|
OnReceive = ProcessWebSocketMessageReceived,
|
||||||
Url = e.Url,
|
Url = e.Url,
|
||||||
QueryString = new NameValueCollection(e.QueryString)
|
QueryString = new NameValueCollection(e.QueryString ?? new NameValueCollection())
|
||||||
};
|
};
|
||||||
|
|
||||||
_webSocketConnections.Add(connection);
|
_webSocketConnections.Add(connection);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user