mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 227 forks source link

Torrent 'ready' event not fired #121

Closed herlon214 closed 8 years ago

herlon214 commented 9 years ago

Anyone can tell me why the 'ready' event isn't firing sometimes?

bsuh commented 9 years ago

Are you attaching an event handler to the event right after the engine is created? If it has already fired, it won't fire again when you attach an event handler later. If you just need some code to run after 'ready', use engine.ready()

herlon214 commented 8 years ago

Yeah @bsuh, this was the problem. Thanks!