Skip to content

Don't send basic.cancel-ok on a closing channel - #758

Merged
michaelklishin merged 1 commit into
mainfrom
skip-cancel-ok-on-closing-channel
Oct 28, 2026
Merged

michaelklishin merged 1 commit into
mainfrom
skip-cancel-ok-on-closing-channel

Conversation

@eglitobias

Copy link
Copy Markdown
Contributor

If a server-sent basic.cancel arrives after the client has sent channel.close, the basic.cancel-ok reply (#754) hits a closed channel and the server closes the connection:

operation basic.cancel_ok caused a connection exception channel_error: "expected 'channel.open'"

This makes basic_consume_spec.rb flaky on RabbitMQ 4.3.7+. Reproduced locally under load: 3 of 6 connections closed on main, none with this change.

A basic.cancel that arrives after channel.close was sent made the server close the connection with CHANNEL_ERROR (expected 'channel.open').
@michaelklishin michaelklishin added this to the 3.5.1 milestone Oct 28, 2026
@michaelklishin
michaelklishin merged commit 34b3c0f into main Oct 28, 2026
17 checks passed
@michaelklishin
michaelklishin deleted the skip-cancel-ok-on-closing-channel branch October 28, 2026 00:16
@michaelklishin

Copy link
Copy Markdown
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants