We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The client is connected fine and can send and receive events, but some times the server doesn't recieve any event and the client is still connected.
The way to reproduce it: Start and stop the client a few times, until it stops receiveing the pong message.
pong
client:
const socket = io("http://localhost:8080"); socket.on("pong", ({ datetime }) => { console.log(`Response time (${(Date.now() - datetime)}ms)`) }); socket.on("connect", () => { console.log(`Connected! ${socket.id}`); setInterval(() => { socket.emit('ping', { datetime: Date.now() }); }, 1000); }); socket.connect();
server:
const io = new Server(); io.on("connection", (socket) => { console.log(`socket ${socket.id} connected`); socket.on('ping', (data) => { console.log(`[${socket.id}]: ping!`) socket.emit('pong', data) }); }); await serve(io.handler(), { port: 8080, });
The text was updated successfully, but these errors were encountered:
Woooow, only two weeks from the start?? Great job, dude!
Sorry, something went wrong.
Hi! I could indeed reproduce the issue, I'm investigating.
fix(engine): properly pause the polling transport during upgrade
c706741
Before that change, the client was stuck waiting for the ongoing HTTP long-polling request to be cleanly closed by the server, and the upgrade process would fail after the 10s delay. Note: the Node.js client implementation does not resume polling ("unpause") in that case, which looks like a bug. Related: - #4 - socketio/engine.io@00f9738 - socketio/engine.io@1c96ca4 - https://github.com/socketio/engine.io-client/blob/dfee8ded722a8c4f9f773505d0c77b4561569863/lib/transports/polling.ts#L84-L116
This should be fixed by c706741, included in 0.2.0.
Good catch, thanks!
@pagoru can you share your full code from client to connect, I'm trying to connect, but never I have fabled connect :(
How do you get variable "io"?
No branches or pull requests
The client is connected fine and can send and receive events, but some times the server doesn't recieve any event and the client is still connected.
The way to reproduce it:
Start and stop the client a few times, until it stops receiveing the
pong
message.client:
server:
The text was updated successfully, but these errors were encountered: