new_coder
new_coder

Reputation: 103

Some kind of timeout proglem with node.js / socket.io chat

We've built simple node.js socket.io chat from an example chat document. Here is our problem that we've stucked with;

The server goes some kind of timeout or screensaver mode..! People on first conversation always have to make f5. Then it works for a day.. I am not sending any code or something we need guidance what to look for. Node.js? socket.io? What can cause this silly problem? Thx

Upvotes: 0

Views: 622

Answers (1)

JanUlrich
JanUlrich

Reputation: 125

But if a day passed without any conversation people that starts first conversation on that day has to make f5 to make some kind of trigger. Then anyone after them starts without any problem.

This sounds like you're trying to keep a websocket connection open for several days without any client doing any reconnect?

If this is the case, then maybe it is a clientside problem. Perhaps the browser closes the websocket-connection after a long time. Your web app doesnt recognize the lack of connection and still shows "it's ready to start conversation". But browser doesnt send any messages to the server anymore. Check this thread: howto reestablish connection

It would help a lot, if you show us some code.

Best regards

Upvotes: 2

Related Questions