max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
668 stars 114 forks source link

Fix duplicate stream events. #79

Closed mtth closed 8 years ago

mtth commented 8 years ago

Thanks for this very convenient library!

Previously, a single 'connection' event could trigger multiple 'stream' events (when multiple handlers were added). Now each connection will only ever trigger it once.

An alternate implementation would be to always proxy the event, i.e. not wait for the first 'stream' handler to be attached; but this felt less in line with the existing implementation. Let me know which you prefer.

max-mapper commented 8 years ago

lgtm, but @mcollina is more familiar with this part of the code so ill let him decide

mcollina commented 8 years ago

Ok for me :). Il giorno dom 20 dic 2015 alle 23:10 maxogden notifications@github.com ha scritto:

lgtm, but @mcollina https://github.com/mcollina is more familiar with this part of the code so ill let him decide

— Reply to this email directly or view it on GitHub https://github.com/maxogden/websocket-stream/pull/79#issuecomment-166158304 .

max-mapper commented 8 years ago

OK released as a new minor version (wasn't sure if I should do patch, minor, major so I went for minor this time)

mtth commented 8 years ago

Minor is good. Thanks @maxogden @mcollina !