CheeseLord / warts

WAcky Real Time Strategy
MIT License
1 stars 0 forks source link

Crashes in main server component don't disconnect clients #31

Open kronmillerg opened 7 years ago

kronmillerg commented 7 years ago

The server seems to have a main component plus a separate component that talks to each client. (I'm not sure what to call these components -- they're almost like separate threads, except they all run in a single thread.) If one of these components crashes, it doesn't bring down the rest of them. When it's one client's component, this usually isn't a problem (though it might leave something in an inconsistent state...) because all the other clients can just keep on going as if nothing went wrong. But if the crash happens in the main component, then none of the clients get disconnected until they actually try to talk to the server and their components realize that there's nothing left of the main server to talk to. This makes it a little hard to that the server has actually crashed.

I propose that all server crashes should bring the whole thing down, to help motivate us to actually fix them :)

kronmillerg commented 7 years ago

5556c3c0b4fc55f17de1f3d8d96288746a36775a fixed the main case for this issue. Not sure if there's more cases left.

kronmillerg commented 7 years ago

Yes, there are. If backend.stdioMessage crashes, it doesn't disconnect the clients.