Skip to content

.on() doesnt register multiple listeners #203

@yesitsfebreeze

Description

@yesitsfebreeze

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:

listener = (callback, ....) => {
  ...
}.bind(callback)

this.eventEmitter.on(eventName, listener)
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions