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

Fix problem with UnexpectedFrameEnd raise #24

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Conversation

grk
Copy link
Contributor

@grk grk commented Feb 15, 2024

No description provided.

Copy link
Member

@dentarg dentarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@dentarg
Copy link
Member

dentarg commented Feb 15, 2024

@grk are you able to say how you found this? did your code crash? do you know how to reproduce the situation?

@grk
Copy link
Contributor Author

grk commented Feb 15, 2024

I messed up my config and tried to connect to the mqtt port of our rabbitmq instance 🤦🏻

@@ -443,7 +443,7 @@ def establish(socket, user, password, vhost, options)

type, channel_id, frame_size = buf.unpack("C S> L>")
frame_end = buf.getbyte(frame_size + 7)
raise UnexpectedFrameEndError, frame_end if frame_end != 206
raise UnexpectedFrameEnd, frame_end if frame_end != 206
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is still not correct, it should be Error::UnexpectedFrameEnd, noticed this when writing a test for this, I will push it to this branch soon

@dentarg dentarg changed the title Fix invalid reference from UnexpectedFrameEndError to UnexpectedFrameEnd Fix problem with UnexpectedFrameEnd raise Feb 15, 2024
@grk
Copy link
Contributor Author

grk commented Feb 15, 2024

I think there's another use that's missing the Error namespace: https://github.com/cloudamqp/amqp-client.rb/blob/main/lib/amqp/client/connection.rb#L185

@dentarg
Copy link
Member

dentarg commented Feb 15, 2024

You're right, thanks

@dentarg dentarg merged commit 369c24b into cloudamqp:main Mar 15, 2024
10 checks passed
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