socket closed after few minutes
-
Re: socket closed after few minutes
My WebSocket connection in Node.js works fine initially, fetching data as expected. However, after around 1.5 hours, the connection inexplicably drops while the Node.js server remains running. To resume data fetching, I have to manually stop and restart the Node.js server. How can I address this issue?
-
@chetansuri Well said!
-
Hello @pratima
please do error handling from your side and also please share your code
Regards,
SmartAPI Team -
@pratima you should do some error handling within your node.js code and let it reconnect if it disconnect anytime. there will be some missing data when websocket disconnect and reconnect but disconnection handling should be done within your code