Hi,
Is it possible to close connection, so that I can create new app, without previously connected websocket hanging around?
Basically I want to dynamically register and unregister entity listeners based on user's actions. Since I expect this to happen relatively rarely, it's fine for me to create new app every time I need to change entities, however currently I don't see any way to stop app (from another goroutine), after calling app.Start()
Unless app.Cleanup() does that, but as far as I can tell, it just cancels the context. Does that close the websocket? Sorry for stupid question, I don't really understand how contexts work.
Alternatively, unregistering events would be fine for my use-case, but I expect that just closing connection and starting a new one will be less work to implement and less bug-prone in the future.
Thanks for great library and have a nice day!
Hi,
Is it possible to close connection, so that I can create new
app, without previously connected websocket hanging around?Basically I want to dynamically register and unregister entity listeners based on user's actions. Since I expect this to happen relatively rarely, it's fine for me to create new
appevery time I need to change entities, however currently I don't see any way to stop app (from another goroutine), after callingapp.Start()Unless
app.Cleanup()does that, but as far as I can tell, it just cancels the context. Does that close the websocket? Sorry for stupid question, I don't really understand how contexts work.Alternatively, unregistering events would be fine for my use-case, but I expect that just closing connection and starting a new one will be less work to implement and less bug-prone in the future.
Thanks for great library and have a nice day!