Skip to content

Closing connection #32

Description

@LukaszMoskala

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions