DarkMultiPlayer Client

DarkMultiPlayer Client

38.8k Downloads

HTTP Server is not stopped in /restart - c83d2f14b1977ebf149112de6644ae36aefee756

CP44 opened this issue ยท 4 comments

commented

c83d2f1
(v0.1.5.6 does not exhibit this behavior.)
HTTP Server is not stopped by /restart before process attempts to restart it.
Use of /restart results in the following because the original listener is still running.

[15:17:38][FATAL] : Error in main server thread, Exception: System.Net.HttpListenerException (0x80004005): Failed to listen on prefix 'http://*:7084/' because i
t conflicts with an existing registration on the machine.
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at DarkMultiPlayerServer.Server.StartHTTPServer()
at DarkMultiPlayerServer.Server.Main()
[15:17:38][ERROR] : Exception while listening to HTTP server!, Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListener'.
at System.Net.HttpListener.CheckDisposed()
at System.Net.HttpListener.EndGetContext(IAsyncResult asyncResult)
at DarkMultiPlayerServer.Server.asyncHTTPCallback(IAsyncResult result)

commented

This should've been fixed via b671ae2. Have you tried running DMPServer as administrator (instead of waiting for it to ask you to run as admin)?

commented

Uh oh... here comes the question of whether you care about XP/2003...

Original test case was XP Professional running DMPServer with proper firewall exceptions (UAC Administrator classification did not apply). Re-tested on Windows 7 Pro and found that the situation does not occur (whether UAC "Admin" originally or after escalation prompt restart).

Although the logging lines are consistent as follows,
{
[21:33:28][INFO] : Command input: /restart
[21:33:28][INFO] : Restarting
[21:33:28][INFO] : Force stopping HTTP server...
}
Under XP, the HTTP listener never stops, as confirmed by CurrPorts/CPorts.exe

commented

That's not right.. stuff like that shouldn't be happening only on XP. (After all, you don't even need UAC to access regedit in XP)

commented

I'll borrow my sisters laptop and sort this one out now.