Skip to content

Connection variable is not set to false when WebSocket receives DISCONNECT #123

@jasons-medistaff

Description

@jasons-medistaff

When the client actively disconnects or unsubscribes, "connection" variable is correctly set to false. However, when the client receives a DISCONNECT packet, the WebSocket is successfully torn down, but the "connection" variable remains true.

We have code that checks for isConnected(), and rebuild the connection if it is false. Since the "connection" variable is not set to false, we do not have a way to check if the WebSocket connection is active or not.

As a workaround, we change the "connection" variable inside the stompClientDidDisconnect function. However, we are afraid that this may cause problems inside the Stomp library code.

Is there a reason why "connection" variable is only set to false when the client disconnects and not when the connection is shutdown?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions