You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i create a second WS server for my node server, the first connection is closed at the connection and an error thrown.
this problem dont exist with ws v1.4 but exist with v2.x
simple exemple :
const ws = require("ws");
const http = require("http");
// Node Server
let httpServ = http.createServer();
// First Ws server
let wss1 = new ws.Server({ server: httpServ , path: '/test1/a' });
wss1.addListener('connection', (ws) => {
console.log('CO1');
ws.on('close', () => console.log('CL1'));
});
// Second Ws server
let wss2 = new ws.Server({ server: httpServ , path: '/test2/b' });
// listen
httpServ .listen(8080, () => {
// make connection for first
let wsClient = new ws(`ws://localhost:8080/test1/a`);
});
error :
Error: FIN must be set
at Receiver.getInfo (...\node_modules\ws\lib\Receiver.js:216:20)
at Receiver.startLoop (...\node_modules\ws\lib\Receiver.js:149:16)
at Receiver.add (...\node_modules\ws\lib\Receiver.js:135:10)
at Socket._ultron.on (...\node_modules\ws\lib\WebSocket.js:141:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:189:7)
at Socket.Readable.read (_stream_readable.js:381:10)
at flow (stream_readable.js:761:34)
at resume (_stream_readable.js:743:3)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
i use node v7.5.0
The text was updated successfully, but these errors were encountered:
When i create a second WS server for my node server, the first connection is closed at the connection and an error thrown.
this problem dont exist with ws v1.4 but exist with v2.x
simple exemple :
error :
i use node v7.5.0
The text was updated successfully, but these errors were encountered: