mafintosh / torrent-stream

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

Assuring read stream has ended #29

Closed chase26091 closed 10 years ago

chase26091 commented 10 years ago

I'm utilizing the read stream to pipe data down to a lame mp3 decoder then to the speakers. Im using the read streams destroy() function when done listening to the file, is this releasing the saved data and disconnecting from peers?

asapach commented 10 years ago

It does disconnect from the peers and stops all network and disk activity (after the destroy callback has fired). What do you mean by releasing the saved data? If you want to delete the files, you should call remove.

chase26091 commented 10 years ago

Thank you, i was just making sure to avoid from underlying leak or what not. I mean't releasing the data left in the stream if destroy is called while the stream is holding information.