Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket.io process keeps running despite Unity editor being stopped. #11

Closed
DaveKap opened this issue May 16, 2022 · 2 comments
Closed

Comments

@DaveKap
Copy link

DaveKap commented May 16, 2022

After successfully connecting to a test server with the example client code via the Unity editor in run mode, something peculiar happens after stopping.
Unity_nZF8C1HejG
For some reason the socket.io process just keeps going, despite the fact I stopped the program. I have to kill Unity to make this stop.
I tried to add this code, which should kill the socket when the editor stops, but that doesn't seem to be the case:

    private void OnApplicationQuit()
    {
        socket.Disconnect();
    }
@ThimoDEV
Copy link

Have you tried Disconnecting the socket in the OnDisable or OnDestroy method? I don't know if OnApplicationQuit is the best method to use for the editor play mode.

@itisnajim
Copy link
Owner

duplicated
#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants