max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
668 stars 114 forks source link

Error event judgement in file 'stream.js' #155

Open j78742 opened 4 years ago

j78742 commented 4 years ago

// according to https://github.com/baygeldin/ws-streamify/issues/1 // Nodejs WebSocketServer cause memory leak // Handlers like onerror, onclose, onmessage and onopen are accessible via setter/getter // And setter first of all fires removeAllListeners, that doesnt make inner array of clients on

var eventListenerSupport = ('undefined' === typeof socket.addEventListener)

The sign ‘===’ in this line of code should change to ‘!==’.