Add retry behavior to reconnection check (CHECK_DELAY and CHECK_MAX_COUNT options)#32
Open
i20 wants to merge 1 commit intoianharrier:masterfrom
Open
Add retry behavior to reconnection check (CHECK_DELAY and CHECK_MAX_COUNT options)#32i20 wants to merge 1 commit intoianharrier:masterfrom
i20 wants to merge 1 commit intoianharrier:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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