Skip to content

Neither websocket nor engine.io connection is cleanly closed #419

@ladenedge

Description

@ladenedge

I have the following code:

Socket = new SocketIO(....);

// do stuff ..

await Socket.DisconnectAsync();
Socket.Dispose();

The DisconnectAsync() method seems to unsubscribe from the socket.io session, as I would expect:

Image

However, after that I see neither of:

  1. An engine.io disconnect ("1")
  2. A ClientWebSocket close.

And indeed, my server reports the connection is not cleanly closed:

The remote party closed the WebSocket connection without completing the close handshake.

Am I misusing the library somehow? Looking through the code, it doesn't appear that ClientWebSocket.Close() is ever really called or callable? (I also don't see where the engine.io disconnect is generated, but I'm probably just missing it.) Shouldn't these things just happen when I dispose of the SocketIO class?

What am I doing wrong here?

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