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

can't return nothing from an event handler #26

Closed
dude8604 opened this issue Apr 4, 2016 · 2 comments
Closed

can't return nothing from an event handler #26

dude8604 opened this issue Apr 4, 2016 · 2 comments
Assignees
Labels

Comments

@dude8604
Copy link

dude8604 commented Apr 4, 2016

With the javascript socket.io, if fn is the server's callback question to the client, calling fn() will send a blank response to the client. Is there a way to do that with this library? I've tried all I can think of, but it always sends at least true, false, or null, but never just blank like the original socket.io. Is this a limitation of this library or am I doing something wrong?

@miguelgrinberg
Copy link
Owner

It's a bug, you are right. If you don't return anything, the library will call the callback function with (null). One way to trick it into doing the right thing is, I think, to return an empty tuple:

return tuple()

Have you tried that?

In any case, I will fix this.

@dude8604
Copy link
Author

dude8604 commented Apr 5, 2016

Thanks, that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants