ssbc / ssb-ws

ssb-ws & http server for ssb
MIT License
10 stars 9 forks source link

RangeError: out of range index #1

Closed evbogue closed 6 years ago

evbogue commented 8 years ago

This is one of two errors I've been getting that causes ssb-ws to crash scuttlebot server.

This happens when I am connected with the lite client over websockets.

/home/ev/.ssb/node_modules/ssb-ws/node_modules/ws/lib/Receiver.js:386
    default: srcBuffer.copy(dstBuffer, dstOffset, 0, length); break;
                       ^

RangeError: out of range index
    at RangeError (native)
    at fastCopy (/home/ev/.ssb/node_modules/ssb-ws/node_modules/ws/lib/Receiver.js:386:24)
    at Receiver.add (/home/ev/.ssb/node_modules/ssb-ws/node_modules/ws/lib/Receiver.js:86:3)
    at Socket.realHandler (/home/ev/.ssb/node_modules/ssb-ws/node_modules/ws/lib/WebSocket.js:800:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at TCP.onread (net.js:542:20)
dominictarr commented 8 years ago

hmm, this might be a bug in the ws module, possibly caused by many tiny writes being queued up?