Join GitHub today
Server error which MCEC is killed and then reopened #3
It seems that if the MCEC application is closed while a server is active then when you restart MCEC with the server function enabled that you get an error. It reports:
If I first disable the server and then exit the application this problem does not occur. If I change the port to a different number then the server can successfully run. This behavior appears to be the same in both Win7 and Win10.
Maybe the port is somehow locked?
Any ideas how to fix this? I have not tried rebooting to see if that fixes the problem, but that shouldn't have to be done.
Some further work on this. when I use netstat I can see that for some reason some previous ports for MCEC are still listening. Here is the output of netstat -a -n -o
So it looks like MCEC is not nicely closing the port when it is closed with the server active. This does NOT happen when you disable to server before closing MCEC. I can manually kill these tasks using a command such as "taskkill /f /im 17320".
It seems like after a while these processes will die off but it is hard to figure out how long this timeout is.
Why is this issue a problem? I was trying to figure out how to do some changes to the commands file. I believe that you have to restart MCEC to get it to reload the commands file. So if you close and reopen MCEC then you have this problem. I now know that you should disable the server before stopping but that isn't obvious. Is it documented anywhere? I didn't see it.