-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
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
connection dropping afer one minute #80
Comments
Hi @mikuso, we found out the problem is with Pong response. Anything else we can do to fix it ? |
Hi @saimirg Were you able to recreate this issue using the WS library? What happens when the WS library receives a malformed pong? One possible solution might be to set the const server = new RPCServer({
protocols: ['ocpp1.6'], // server accepts ocpp1.6 subprotocol
strictMode: true, // enable strict validation of requests & responses
pingIntervalMs: Infinity, // disable pings
}); This should stop the server from sending pings, but disables the keepAlive functionality - so you may end up with lingering connections which get "stuck" if they don't cleanly disconnect. |
Yes, the same behavior happens with WS library when initiating Ping from server side. An error will be thrown and connection would drop when pong is received. Setting pingIntervalMs: Infinity (we tried null) will work on this particular charger but has an effect on other chargers. It would be great if we could set it on charger level rather then on server. |
Understood. Have you tried using Something like... server.on('client', client => {
if (client.identity === 'badclient') {
client.reconfigure({ pingIntervalMs: Infinity });
}
}); |
Hi @mikuso, i need some help. I have a specific charger that is dropping connection after one minute. One the following simple code, the charger disconnects after one minute. However, if I connect the charger using the WS library the charger stays connected and i can communicate two ways.
This is the code used where the charger disconnects.
Charger does not disconnect when using this code:
The text was updated successfully, but these errors were encountered: