You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
socketmodeHandler.RunEventLoop() function doesn't allow to provide context for cancellation, so I couldn't find any way to gracefully stop event handling from websocket.. One of the ways is to close handler.Client.Events channel, but it is dangerous due to possible panics in channel writes, it also not the only channel in this struct, and it is not guaranteed that websocket connection will be gracefully shut down :(
In other abstractions library has methods like RunContext() and I think it is good idea to write such a method for socketmodeHandler.
I could do it myself, but I aware of not propper shutting down the client (I coudn't find any close(client.Events) channel)
The text was updated successfully, but these errors were encountered:
It looks like that logic is somewhat in place but context.TODO() is used instead of exposing a context to be passed. I'm also experiencing this issue and would be willing to put up a PR for the fix.
Description
socketmodeHandler.RunEventLoop() function doesn't allow to provide context for cancellation, so I couldn't find any way to gracefully stop event handling from websocket.. One of the ways is to close handler.Client.Events channel, but it is dangerous due to possible panics in channel writes, it also not the only channel in this struct, and it is not guaranteed that websocket connection will be gracefully shut down :(
In other abstractions library has methods like RunContext() and I think it is good idea to write such a method for socketmodeHandler.
I could do it myself, but I aware of not propper shutting down the client (I coudn't find any close(client.Events) channel)
The text was updated successfully, but these errors were encountered: