-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixed nil pointer dereference error when the Message == nil #57
Conversation
I encountered a panic because of this. Can you take a look? |
Why is there a resp.PubsubEvent with a nil message btw? LGTM |
Yeah, I don't know ;) |
Fixed nil pointer dereference error when the Message == nil
I figured it out why. It happens when you publish an empty message which doesn't have data nor any labels.
|
No I was wrong. It also happens when you publish a message with nil data, even you provide a label. |
I wouldn't touch the existing code, a nil message may represent a distinct case than a []byte{} message. It was unexpected for me to receive a nil message, because I didn't know you were able to publish them. |
Yeah, the problem is that with this library, you actually can not receive the nil message because pull returns an error. |
Maybe we can return a message with nil Data instead of returning an error? |
No description provided.