vadimtsushko / objectory

Unsupported: Objectory - object document mapper for server-side and client side Dart applications
MIT License
55 stars 12 forks source link

Implement a way to close all Objectory Server clients #32

Closed kaisellgren closed 11 years ago

kaisellgren commented 11 years ago

We could store all ObjectoryClients in a Set or List and close every single of them when calling some method on the ObjectoryServerImp like closeAllClients().

I need this because when there's an exception that throws and isn't caught, the Objectory server will hang forever and does not respond to client's WS requests. Closing the connection to the clients, will trigger a re-establish on our application and will make it work again.

Ideally such uncaught exceptions shouldn't happen, but still it's good to close the connections and "restart" automatically when things go bad.

vadimtsushko commented 11 years ago

That will require sound testing in more less real client server workload I think. Feel free to implement it. I'll gladly accept pull request