websockets / ws

Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js
MIT License
21.73k stars 2.42k forks source link

RSV1 how to prevent server crash #1191

Closed GREEB closed 7 years ago

GREEB commented 7 years ago

Hey How can i prevent this from crashing my servers? and what is causing this?

0|a   | [FATAL] Error: RSV1 must be clear
0|a   |     at Receiver.getInfo (/opt/a/gameservers/6984/node_modules/ws/lib/Receiver.js:191:18)
0|a   |     at Receiver.startLoop (/opt/a/gameservers/6984/node_modules/ws/lib/Receiver.js:153:16)
0|a   |     at Receiver.add (/opt/a/gameservers/6984/node_modules/ws/lib/Receiver.js:139:10)
0|a   |     at Socket._ultron.on (/opt/a/gameservers/6984/node_modules/ws/lib/WebSocket.js:142:22)
0|a   |     at emitOne (events.js:96:13)
0|a   |     at Socket.emit (events.js:191:7)
0|a   |     at Socket.Readable.read (_stream_readable.js:383:10)
0|a   |     at flow (_stream_readable.js:763:34)
0|a   |     at resume_ (_stream_readable.js:745:3)
0|a   |     at _combinedTickCallback (internal/process/next_tick.js:80:11)
lpinca commented 7 years ago

Add a listener for the 'error' event.

ws.on('error', (err) => handleError(err));

This error is fired when the rsv1 bit is flagged and the permessage-deflate extension is disabled. The client should not set it if the server does not support permessage-deflate.

GREEB commented 7 years ago

it was an error on our side, sorry about that!

lpinca commented 7 years ago

Ok, closing then.