Skip to content

Conversation

@aquamoth
Copy link

I suggest rewriting the cleanup logic to ask RealTimeServer to disconnect all open sockets before stopping the http server.

This code is still somewhat a hack, because I don't quite understand why I need some setTimeout() wrappers around done, but I still think this is a lot better. Also the private variable RealTimeServer._disconnectAllCallback can be debated, but doing it like this we can keep numberOfActiveConnections() as a private method without explicit testing.

This is my preferred PR of 3 to improve the shutdown logic.

@aquamoth aquamoth changed the title RealTimeServer.disconnectAll() implemented. RTS stop 3 May 21, 2017
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

Successfully merging this pull request may close these issues.

1 participant