Skip to content

Add retry behavior to reconnection check (CHECK_DELAY and CHECK_MAX_COUNT options)#32

Open
i20 wants to merge 1 commit intoianharrier:masterfrom
i20:master
Open

Add retry behavior to reconnection check (CHECK_DELAY and CHECK_MAX_COUNT options)#32
i20 wants to merge 1 commit intoianharrier:masterfrom
i20:master

Conversation

@i20
Copy link
Copy Markdown

@i20 i20 commented Feb 20, 2026

Hi,

First of all thanks a lot for the great work, this script saves me a lot of time <3

I just want to propose a little evolution as I was recently confronted to a false negative
The script returned an error code because the check_ping after reconnection failed due to a slow reconnection (was a success in fact)

So I added a retry behavior to the connection check after reconnecting with two options to configure (CHECK_DELAY and CHECK_MAX_COUNT)

Also I noted that in the error log I received no IP was displayed (and therefore ping ultimately failed) so I added a little check to early return 1 in check_ping() to avoid a confusing message

The notification I received :
<<<
[I] Synology DSM reports VPN is connected.
[I] Pinging VPN gateway address x.x.x.x.
[W] The address x.x.x.x did not respond to ping.
[I] Attempting to reconnect.

kill client ...OK
get arguemnt id: xxxxxx
[I] Synology DSM reports VPN is connected.
[I] Pinging VPN gateway address . <----------- note the empty IP
[W] The address did not respond to ping.
[E] VPN failed to reconnect. Exiting.
<<<

Sincerely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant