-
Notifications
You must be signed in to change notification settings - Fork 646
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
WebsocketOutbound sendClose never returns when nested #444
Comments
With the current implementation this is to be expected as we already have one queued sender and we will wait for this sender to terminate (here your sendObject) to run the publisher created by sendClose.
I'll see with @violetagg can do a quick work around until such refactor happen to make sendClose different, but nested sendXxx will still have the same problem until we fix the overall internal design for sending. |
FWIW a nested send is neither expected nor supported in the Spring WebSocket API. It is also not explicitly validated against, but the API provides only one send method with a Publisher. The one I'm concerned with is sendClose. If it can't be fixed in the near future, we'll need to document it as a limitation since unlike other send methods, this one is actually expected to be used in addition to a send with publisher. |
Prepare to send a close frame on subscribe then close the underlying channel. Any previous publisher will be canceled. Clarify that nesting NettyOutbound#send* methods is not supported. Related to #444
Prepare to send a close frame on subscribe then close the underlying channel. Any previous publisher will be canceled. Clarify that nesting NettyOutbound#send* methods is not supported. Related to #444
Prepare to send a close frame on subscribe then close the underlying channel. Any previous publisher will be canceled. Clarify that nesting NettyOutbound#send* methods is not supported. Related to #444
Prepare to send a close frame on subscribe then close the underlying channel. Any previous publisher will be canceled. Clarify that nesting NettyOutbound#send* methods is not supported. Related to #444
I can confirm the changes after updating to use Bismuth and Californium snapshots, and adding tests. |
Handling of nested send operations will be tracked with #478 |
Removing reactive bridge was added as a fix for #444. The removing functionality forces PublisherSender to invoke cancel and ChannelOperationsHandler to drain the queued messages. As PublisherSender functionality is not part of ChannelOperationsHandler anymore there is no need to remove ChannelOperationsHandler from the pipeline.
Originally reported for WebFlux in SPR-17306 but I was able to confirm with just Reactor Netty that when a call to
out.sendClose
is nested within the pipeline for the write publisher, then the close does not complete. The following times out:However if the write and close are in a sequence, then it works:
I've confirmed the above with Californium only but the issue was reported against Spring Framework 5.0.9 which is based on Bismuth-SR11.
The text was updated successfully, but these errors were encountered: