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: modify new_from_payload function check logic #423

Closed

Conversation

dontcryme
Copy link

@dontcryme dontcryme commented Apr 21, 2024

Issue : #422

If i communicate with simple node.js(socket.io) server with rust's emit_with_ack function(binary buf) then callback function is not executed.
because of rust client's emit_with_ack function send bad ack.

so i think that pakcet.rs's new_from_payload function check logic need to be modified like below.

[Before]

 if id.is_some(){
     PacketId::BinaryAck
 } else {
     PacketId::BinaryEvent
 },

[After]

  if id.is_some() && id.unwrap() == PacketId::Event as i32{
     PacketId::BinaryEvent
  } else {
    PacketId::BinaryAck
  },

@dontcryme dontcryme closed this Apr 24, 2024
@dontcryme
Copy link
Author

There is an issue, so I will double check.

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.

1 participant