-
Notifications
You must be signed in to change notification settings - Fork 696
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
Subscribe("foo", nil) inconsistency between Conn and EncodedConn #48
Comments
This in the README correct? |
Send a PR.. ;) |
Will take a look when I have some time.. Thanks.. |
I found this comment in the code: |
A normal connection with no handler creates a synchronous subscriber, however will look at the EncodedConn version more closely.. |
EncodedConn is not built currently for NextMsg, I will add an err return though. |
EncodedConn.Subscribe("foo", nil) throws a nil pointer exception instead of deleting the subscription as documented in the README.
Conn.Subscribe("foo", nil) returns normally but does not delete the subscription.
Since there is a Subscription.Unsubscribe() then this 'nil' behavior should be avoided and either return an error in the error field or throw an exception. Looking into the Subscribe code there is some code that looks for a nil callback and some that throws an exception when reflecting.
The text was updated successfully, but these errors were encountered: