### Description
Ka servers A(172.22.247.37) and B(172.22.247.232) use the keepalive module to check if each other's status is available. When one server such as B is down, server A will still send about 16 OPTIONS messages. When A sends the 14th or 15th OPTIONS, ka on A will change B's status to down. At this point, if B restarts, B will reply 200OK to A’s OPTIONS message, and A will change B's status to alive, but A will not send OPTIONS message to B any more. Even if B dies later, B's status will be alive on A forever.
ps: if B is restart at the 14th OPTIONS or earlier, A will correctly send heartbeat OPTIONS to B later. if B is restart at the 16th or later, A will not change B's status to alive, and certainly will not sends OPTIONS to B anymore, but this is correct isn't it?
question is obviously B’s status is alive on A, but A sends no OPTIONS to B.
### Troubleshooting
 
#### Reproduction
1. set keepalive config ant A ``` loadmodule "keepalive.so" modparam("keepalive","ping_interval",3) modparam("keepalive","destination","172.22.247.232") ``` use ka_is_alive function check B's status. 2. restart A server and confirm that the OPTIONS status is correct. 3. stop the B server until the number of retran messages reaches 15. 4. restart B server, and check OPTIONS
#### Log Messages

#### SIP Traffic
 at the time that the arrow points to, 172.22.247.232's status is 1(refers to the log above). but notice that there is no OPTIONS message to 172.22.247.232 anymore.  
### Possible Solutions
### Additional Information
* **Operating System**:
``` Linux localhost.localdomain 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux kamailio 5.5.2 ```
Not sure if anyone is actively working on this module, maybe @NGSegovia, otherwise you should try to see if you can spot what's wrong in the code and eventually make a PR.
For other developers not using the module it may not be easy to build a test bed with two servers and then try to reproduce/fix it.
Hi @LambertHuhu ,
Try disabling the delete_counter, so pinging will be never stopped.
``` modparam("keepalive", "delete_counter", "0") ```
Thanks @NGSegovia!
Closing - seems to be a config option for it. If still something wrong, reopen.
Closed #3028.