aki017 / slack-ruby-gem

A Ruby wrapper for the Slack API
MIT License
242 stars 79 forks source link

Should either the client or server close, we should stop EM #23

Closed tlunter closed 9 years ago

tlunter commented 9 years ago

Rather than just set the websocket to nil, we should stop the EM event loop entirely. Otherwise processes will just sit and nothing will be coming through.

aki017 commented 9 years ago

:+1:

dblock commented 9 years ago

But really we want the client to restart, no? In this case the process is still up and EM may be gone, but the rest of the app is still running.

tlunter commented 9 years ago

@dblock won't EM.stop end the EM.run? I'm not very in tune with eventmachine. My intent was for the start method to return, thus letting the client do whatever it wants rather than forcing this to live on forever.

dblock commented 9 years ago

I have a repro and opened https://github.com/aki017/slack-ruby-gem/issues/24, lets talk about it there.