Sanae6 / SmoOnlineServer

Official server for Super Mario Odyssey: Online
https://discord.gg/jYCueK2BqD
108 stars 27 forks source link

only start listening for clients once everything is initialized #38

Closed Istador closed 1 year ago

Istador commented 2 years ago

Otherwise clients might connect to the server before everything is ready for them. E.g. when restarting the server, the clients will immediately try to reconnect.

Clients might connect before the PacketHandler is initialized, which results in some packets not being processed by the server correctly.

Same goes for the commands: Discord might send in commands before all commands were added to the CommandHandler.

Without the ClientJoined action, clients might even be allowed to connect if they are on the banlist. (Though without this initialization they or regular clients might be broken in some ways?)

(cherry picked from commit 92e540aaa60ab8fcf4c431e188fe3389ab27e6c1)