-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch
@grk are you able to say how you found this? did your code crash? do you know how to reproduce the situation? |
I messed up my config and tried to connect to the mqtt port of our rabbitmq instance 🤦🏻 |
lib/amqp/client/connection.rb
Outdated
@@ -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 |
There was a problem hiding this comment.
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
UnexpectedFrameEnd
raise
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 |
You're right, thanks |
No description provided.