Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.vertx.ext.stomp.StompServerHandler#closeHandler is called twice #94

Open
shenweijiekdel opened this issue Oct 21, 2024 · 2 comments
Open
Assignees
Labels
Milestone

Comments

@shenweijiekdel
Copy link

Questions

Do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.

Version

4.5.8

Context

I am using a STOMP server over WebSocket.
When I actively close a connection, the closeHandler is called twice. this is the implementation of StompServerWebSocketConnectionImpl#close

@Override
public void close() {
cancelHeartbeat();
handler().onClose(this);
try {
socket.close();
} catch (IllegalStateException e) {
// Ignore it, the web socket has already been closed.
}
}

it called handler and closed socket.

socket.endHandler(v -> connection.close());

but called again by endHandler when websocket close frame was received

@tsegismont tsegismont added this to the 4.5.11 milestone Oct 28, 2024
@tsegismont
Copy link
Contributor

Thanks for your report, would you like to contribute a fix?

@shenweijiekdel
Copy link
Author

This PR #95

@tsegismont tsegismont self-assigned this Nov 4, 2024
@vietj vietj modified the milestones: 4.5.11, 4.5.12 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants