BroadbandForum / obuspa

OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent. https://github.com/BroadbandForum/obuspa/wiki
BSD 3-Clause "New" or "Revised" License
93 stars 62 forks source link

Ping count is not reseted after the ALLOWED_MISSING_PONGS threshold is reached #97

Closed s-srakshe closed 1 year ago

s-srakshe commented 1 year ago

Once the ping count becomes > ALLOWED_MISSING_PONGS, then the current connection is closed and a new connection is created after some time. But since the ping count is still > ALLOWED_MISSING_PONGS, the new connection is closed immediately and the cycle repeats forever. This way the connections are continuously created and then closed immediately.

https://github.com/BroadbandForum/obuspa/blob/master/src/core/wsclient.c#L2076

ping count must be reseted to 0 after reaching the value of ALLOWED_MISSING_PONGS.

holme-r commented 1 year ago

Thanks for finding this issue. The fix is to reset the ping failure count upon reconnection in AttemptWsClientConnect(). The fix should be available in the repo in the next week.

holme-r commented 1 year ago

Closing as the fix is now available in v7.0.5 on master branch.

s-srakshe commented 11 months ago

Thanks for the fix.