* Fixed no website directory
* Fixed message errros and startup orders
This commit is contained in:
+12
-13
@@ -30,33 +30,32 @@ namespace Step
|
||||
// Start self host application
|
||||
string configuredUri = "http://localhost:" + ServerConfig.ServerPort.ToString();
|
||||
|
||||
// Start WinForm
|
||||
ServerControlWindow.Start();
|
||||
|
||||
// Register listener to "close application" messages
|
||||
MessageServices.Current.Subscribe(STOP_SERVER, (a, b) =>
|
||||
{
|
||||
StopRequest.Set();
|
||||
});
|
||||
|
||||
// Start Threads
|
||||
ThreadsHandler.Start();
|
||||
// Start listeners
|
||||
ListenersHandler.Start();
|
||||
});
|
||||
|
||||
// Start server services
|
||||
using (WebApp.Start<Step.App_Start.Startup>(url: configuredUri))
|
||||
{
|
||||
// Start WinForm
|
||||
ServerControlWindow.Start();
|
||||
// Start Threads
|
||||
ThreadsHandler.Start();
|
||||
// Start listeners
|
||||
ListenersHandler.Start();
|
||||
|
||||
// Wait interrupt from client
|
||||
StopRequest.WaitOne();
|
||||
|
||||
// Stop Threads
|
||||
ThreadsHandler.Stop();
|
||||
// Stop messageservice listeners
|
||||
ListenersHandler.Stop();
|
||||
LogInfo("Application closed");
|
||||
}
|
||||
|
||||
// Stop Threads
|
||||
ThreadsHandler.Stop();
|
||||
// Stop messageservice listeners
|
||||
ListenersHandler.Stop();
|
||||
// Close WinForm
|
||||
ServerControlWindow.Stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user