Comments (8)
The "reserved fields must be empty" message is emitted by ws
when a client sends invalid WebSocket data. We experience this to happen quite often, don't know if the reverse proxy or broken clients (or both) are the culprit.
So this error is very common in real life environments (and thus not an error rather a "invalid client request") so it should not kill the whole server.
Do you have an 'error' handler for your socket
objects? Like this:
server.on('connection', function (socket) {
socket.on('message', function () { ... });
socket.on('close', function () { ... });
socket.on('error', function (err) {
debug('socket error: ', err); // or just do nothing
});
});
from engine.io.
Unfortunately that doesn't fix things - the error is an unhandled event emitted from the transport. I could try adding an error handler to the transport to patch around this, but I think there is a bug underlying this.
from engine.io.
@mmastrac I see what you mean now. error
must be firing twice on the transport right?
from engine.io.
@guille Correct - and it throws an unhandled exception the second time.
from engine.io.
Yep because we detach the error
event.
from engine.io.
So this is an easy fix
from engine.io.
Great- if you have a suggested patch, I can test it out with our load test. Thanks!
from engine.io.
Please test with master
from engine.io.
Related Issues (20)
- [TS] socket.send / socket.write arguments HOT 1
- Wrong Tag version HOT 2
- Socket instance doesn't wait for all the packets in writeBuffer to be sent before closing the websocket transport. HOT 2
- Downgrade engine_socket transport error "polling request overlap" to 4xx from 5xx HOT 3
- feature: `BaseServer.corsMiddleware` should be publicliy modifiable HOT 3
- data coming from socket io is stopped after 10 minutes when we request call socket io at every 10-10 milisecond backend : node js frontend : angular js HOT 1
- Typescript: engine = undefined HOT 2
- TypeError: Cannot destructure property 'Server' of '_engineIo.default' HOT 5
- Customize response headers with Express middleware HOT 6
- Possible error in websocket code HOT 2
- clientsCount property of server... why need to keep this private, HOT 1
- ReferenceError: TextDecoder is not defined HOT 5
- Node.js versions below 10.2 are not compatible with the latest version 6.5.1. HOT 1
- WebTransport If the length of the data block exceeds maxDatagramSize, the server will be unable to receive the complete message (the client will not send the complete message). HOT 2
- Upgrading from polling to webtransport will report engine invalid WebTransport handshake. HOT 8
- The cache busting t query parameter does not work if multiple connections to the server are made HOT 3
- Add support for Node.js built-in WebSocket? HOT 7
- Send callback may not be called if message is sent during upgrade window HOT 2
- Cannot set `socket.request` to `null` because the property is read-only HOT 2
- `websocket`: `send` callbacks are not all called if multiple messages are sent rapidly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.io.