Browse Source

Fixed rest listener port stuff

Kenric Nugteren 2 năm trước cách đây
mục cha
commit
2cbc754a48
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      prs.server/Engines/Database/DatabaseEngine.cs

+ 3 - 1
prs.server/Engines/Database/DatabaseEngine.cs

@@ -204,9 +204,11 @@ namespace PRSServer
             Logger.Send(LogType.Information, "", string.Format("Starting Rest Listener: Port={0}", Properties.Port));
             if (Properties.WebSocketPort != 0)
             {
+                // Put a log saying to start the web socket listener.
                 Logger.Send(LogType.Information, "", string.Format("Starting Web Socket Listener: Port={0}", Properties.WebSocketPort));
-                RestListener.Init(Properties.WebSocketPort);
             }
+            // This should be out of the if-statement, since the listener needs to be initialised, even if the web socket port is 0.
+            RestListener.Init(Properties.WebSocketPort);
 
             InitialisePort();
             RestListener.Start();