aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/HttpEndPointManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SocketHttpListener/Net/HttpEndPointManager.cs')
-rw-r--r--SocketHttpListener/Net/HttpEndPointManager.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/SocketHttpListener/Net/HttpEndPointManager.cs b/SocketHttpListener/Net/HttpEndPointManager.cs
index 98986333b..07b6331f2 100644
--- a/SocketHttpListener/Net/HttpEndPointManager.cs
+++ b/SocketHttpListener/Net/HttpEndPointManager.cs
@@ -57,8 +57,7 @@ namespace SocketHttpListener.Net
int root = p.IndexOf('/', colon, p.Length - colon);
string portString = p.Substring(colon + 1, root - colon - 1);
- int port;
- if (!int.TryParse(portString, out port) || port <= 0 || port >= 65536)
+ if (!int.TryParse(portString, out var port) || port <= 0 || port >= 65536)
{
throw new HttpListenerException((int)HttpStatusCode.BadRequest, "net_invalid_port");
}