mafintosh / torrent-stream

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

Resolve an uncommon conflict on missing piecesMap #129

Closed watdafox closed 9 years ago

watdafox commented 9 years ago
Resolve an uncommon conflict on missing piecesMap
- prevents 'error length of undefined'

Hello, this verification allows to start streaming some torrents that don't want to start without it. It's an uncommon error I only encountered with one file so far:

[ERROR] TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined
    at Object.that.read (c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage.js:91:21)
    at Object.that.read (c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage-buffer.js:14:13)
    at Object.that.read (c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage-buffer.js:8:50)
    at loop (c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\index.js:547:17)
    at c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\index.js:548:71
    at c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage.js:113:46
    at apply (c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\node_modules\thunky\index.js:16:28)
    at c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\node_modules\thunky\index.js:20:25
    at c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage.js:44:6
    at FSReqWrap.cb [as oncomplete] (fs.js:205:19)
c:\GIT\desktop\node_modules\peerflix\node_modules\torrent-stream\lib\storage.js:91 Uncaught TypeError: Cannot read property 'length' of undefined

My environment:

mafintosh commented 9 years ago

Great. Released in 0.21.1