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

Acknowledgement callback not working because of Line 148: client.go #5

Open
someone-coder opened this issue May 20, 2016 · 0 comments

Comments

@someone-coder
Copy link

someone-coder commented May 20, 2016

Acknowledgements callbacks, eg. when you Emit("myMessage", data, func(s string){...})
were not working for me.
I dug into it and found it is because of Line 148 of client.go, which is currently:

case _ACK:
case _BINARY_ACK:
  return nil, client.onAck(packet.Id, decoder, packet)

When an _ACK arrives, client.onAck() is never called.
If I change it to this, it works:

case _ACK:
  return nil, client.onAck(packet.Id, decoder, packet)
case _BINARY_ACK:
  return nil, client.onAck(packet.Id, decoder, packet)

I'm using Go 1.6.0

Maybe it should be like this?

case _ACK, _BINARY_ACK:
  return nil, client.onAck(packet.Id, decoder, packet)
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

No branches or pull requests

1 participant