aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Net/SocketAcceptor.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-13 16:04:21 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-13 16:04:21 -0500
commit0e9cd51f9c64d4cfad5cb5c7b0ddae6af8d18ac6 (patch)
tree359ef5fb2504ed72e03a51a2e90a1017309143f0 /Emby.Common.Implementations/Net/SocketAcceptor.cs
parent3c55747cd63fd8a69f02efbe9ac48ce76d373b81 (diff)
update .net core startup
Diffstat (limited to 'Emby.Common.Implementations/Net/SocketAcceptor.cs')
-rw-r--r--Emby.Common.Implementations/Net/SocketAcceptor.cs24
1 files changed, 19 insertions, 5 deletions
diff --git a/Emby.Common.Implementations/Net/SocketAcceptor.cs b/Emby.Common.Implementations/Net/SocketAcceptor.cs
index fd65e9fbc..bddb7a079 100644
--- a/Emby.Common.Implementations/Net/SocketAcceptor.cs
+++ b/Emby.Common.Implementations/Net/SocketAcceptor.cs
@@ -14,6 +14,23 @@ namespace Emby.Common.Implementations.Net
public SocketAcceptor(ILogger logger, Socket originalSocket, Action<ISocket> onAccept, Func<bool> isClosed)
{
+ if (logger == null)
+ {
+ throw new ArgumentNullException("logger");
+ }
+ if (originalSocket == null)
+ {
+ throw new ArgumentNullException("originalSocket");
+ }
+ if (onAccept == null)
+ {
+ throw new ArgumentNullException("onAccept");
+ }
+ if (isClosed == null)
+ {
+ throw new ArgumentNullException("isClosed");
+ }
+
_logger = logger;
_originalSocket = originalSocket;
_isClosed = isClosed;
@@ -101,11 +118,8 @@ namespace Emby.Common.Implementations.Net
_onAccept(new NetSocket(acceptSocket, _logger));
}
- if (_originalSocket != null)
- {
- // Accept the next connection request
- StartAccept(e, ref acceptSocket);
- }
+ // Accept the next connection request
+ StartAccept(e, ref acceptSocket);
}
}
}