Skip to content

StompSubProtocolHandler responds with ERROR (Session closed.) on DISCONNECT when using SimpleBrokerMessageHandler [SPR-14568] #19137

Closed
@spring-projects-issues

Description

@spring-projects-issues

Gottfried Huber opened SPR-14568 and commented

I think this was introduced with #16893

StompSubProtocolHandler.getStompHeaderAccessor converts a DISCONNECT_ACK to an ERROR message.

This has the effect that on the client side, the error-callback is called instead of the expected disconnect-callback, which leads to some very dirty workarounds for keeping the state sane.

This only happens when using SimpleBrokerMessageHandler. With the StompBrokerRelayMessageHandler, the MessageHeaderAccessor is already instanceof StompHeaderAccessor, and I don't get into the else if clause where the ERROR thing happens.

I would expect to see -StompHeaderAccessor.create(StompCommand.DISCONNECTED)- a RECEIPT frame response according to the receipt header of the DISCONNECT frame


Affects: 4.2.7, 4.3.1

Issue Links:

Referenced from: commits cc33bfa, 8b4f60b, 198a74d

Backported to: 4.2.8

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions