pull-stream / pull-many

combine many streams into one stream, as they come, while respecting back pressure
MIT License
13 stars 4 forks source link

Error: this should never happen #1

Open clehner opened 8 years ago

clehner commented 8 years ago

This occurred when I resumed patchwork with SIGCONT after having stopped it with SIGSTOP for a few hours.

Uncaught Exception:
Error: this should never happen
    at /usr/local/src/patchwork/node_modules/pull-many/index.js:91:37
    at next (/usr/local/src/patchwork/node_modules/pull-many/index.js:107:9)
    at read (/usr/local/src/patchwork/node_modules/pull-many/index.js:114:40)
    at /usr/local/src/patchwork/node_modules/scuttlebot/node_modules/pull-stream/throughs.js:101:14
    at start (/usr/local/src/patchwork/node_modules/pull-paramap/index.js:36:7)
    at drain (/usr/local/src/patchwork/node_modules/pull-paramap/index.js:23:21)
    at /usr/local/src/patchwork/node_modules/pull-paramap/index.js:47:13
    at Object.cb (/usr/local/src/patchwork/node_modules/secure-scuttlebutt/index.js:307:11)
    at /usr/local/src/patchwork/node_modules/ssb-feed/util.js:47:12
    at Array.forEach (native)
dominictarr commented 8 years ago

I guess that might happen if current.read threw because then https://github.com/dominictarr/pull-many/blob/master/index.js#L106 would not get set and then https://github.com/dominictarr/pull-many/blob/master/index.js#L104 would be activated, although it was actually async.

dominictarr commented 8 years ago

if it threw, and then something caught the error and kept on running (as patchwork does!)

clehner commented 8 years ago

Yes, patchwork kept running when that happened. It hasn't happened again since.