-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
.on() doesnt register multiple listeners #203
Comments
This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Actually, does that mean that only one listener can be active at a time? I was struggling a bit because there's no |
I've just tested and it seems that the subsequent calls to this.channel.on('spectating', (data: Data) => {
if (this._onSpectating)
this._onSpectating(data);
}); That's a bit more annoying than just being able to override the handler. |
This issue is stale because it has been open 500 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Discussed in #202
Originally posted by yesitsfebreeze May 13, 2022
Would it be possible to implement the on listener in a different way to this?
Currently the problem is that you cant register multiple listeners via
.on
, due to the fact that the callback is passed into the lambda.https://github.com/geckosio/geckos.io/blob/master/packages/server/src/geckos/channel.ts#L272
this would be sufficient i guess:
The text was updated successfully, but these errors were encountered: