diff --git a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
index fc1cd8fbdd..be732f40f8 100644
--- a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
+++ b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
@@ -112,6 +112,24 @@ namespace Tgstation.Server.Host.Components.Session
};
}
+ ///
+ /// Check if a given can be bound to.
+ ///
+ /// The port number to test.
+ static void PortBindTest(ushort port)
+ {
+ using var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+
+ try
+ {
+ socket.Bind(new IPEndPoint(IPAddress.Loopback, port));
+ }
+ catch (Exception ex)
+ {
+ throw new JobException(ErrorCode.DreamDaemonPortInUse, ex);
+ }
+ }
+
///
/// Construct a
///
@@ -425,23 +443,5 @@ namespace Tgstation.Server.Host.Components.Session
if(otherUserName.Equals(ourUserName, StringComparison.Ordinal))
throw new JobException(ErrorCode.DeploymentPagerRunning);
}
-
- ///
- /// Check if a given can be bound to.
- ///
- /// The port number to test.
- static void PortBindTest(ushort port)
- {
- using var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
- try
- {
- socket.Bind(new IPEndPoint(IPAddress.Loopback, port));
- }
- catch (Exception ex)
- {
- throw new JobException(ErrorCode.DreamDaemonPortInUse, ex);
- }
- }
}
}