Skip to content

Transports.Websocket is not terminate #39

Description

@yangukmo

I'm making an app that repeats connect/terminate multiple times without closing the app.
And the number of processes increased for unknown reasons.
As a result of checking the log, webclient_socket is not normally terminated.

# process count: 0
{:ok, socket} = Socket.start_link(socket_config)

wait_for_socket(socket)
# process count: 4
{:ok, channel} = Channel.join(socket, "user-1234")
# process count: 5
Channel.stop(channel)
# process count: 4
Socket.stop(socket)
# process count: 3

# Repeat
{:ok, socket} = Socket.start_link(socket_config)

wait_for_socket(socket)
# process count: 7
{:ok, channel} = Channel.join(socket, "user-1234")
# process count: 8
Channel.stop(channel)
# process count: 7
Socket.stop(socket)
# process count: 6

...

As a result, processes accumulate and the app is terminated.
How can I shutdown a websocket completely?

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions