NodeListServer-Example icon indicating copy to clipboard operation
NodeListServer-Example copied to clipboard

Cannot stop NodeLIstServer in Unity Editor.

Open kvibert opened this issue 4 years ago • 1 comments

After I start list server in Unity Editor, the NodeListServer instance show "New server added: 'FractalServer' from ::ffff:127.0.0.1. UUID: 'ecb4d255-fbc8-4c4d-81a5-52e093bbf3ca'", then I stop server in Unity Editor, the NodeListServer instance show nothing , and restart it in unity editor, there will be an error occurs, please see the log:

NodeLS: Mission failed. We'll get them next time. An error occurred while registering the server. One or more required fields, like the server GUID, name and port might be missing. You will need to fix this and call RegisterServer again to retry. UnityEngine.Debug:LogError(Object) <RegisterServerInternal>d__43:MoveNext() (at Assets/NodeListServer/NodeListServerNetManager.cs:356) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

HTTP/1.1 400 Bad Request UnityEngine.Debug:LogError(Object) <RegisterServerInternal>d__43:MoveNext() (at Assets/NodeListServer/NodeListServerNetManager.cs:359) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

kvibert avatar Jul 15 '20 10:07 kvibert

Ahh, that's due to a UUID collision. For whatever reason, when you stopped the NodeLS NetworkManager, OnStopServer didn't get called, or you didn't call base.OnStopServer() in your own custom networkmanager based on NodeLS.

There's a fix I'll commit shortly that will hopefully fix this behaviour.

SoftwareGuy avatar Jul 18 '20 02:07 SoftwareGuy