Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

Allow keep-alive timeout to be configured by the server or client #122

Merged
merged 2 commits into from
Oct 22, 2019

Conversation

rob-patchett
Copy link

CoreConfiguration.OpenVPN.pingTimeout is quite a long timeout for mobile devices, so I've added KeepAliveTimeout, which can be configured either from the server or using OpenVPN.Configuration. I have tested both scenarios and added a basic test for ensuring the ping-restart server config is parsed correctly.

I'm happy to make changes if there are any issues with my implementation 🙂
Thanks

@keeshux keeshux self-assigned this Sep 30, 2019
@keeshux keeshux added the enhancement New feature or request label Sep 30, 2019
@keeshux keeshux added this to the 2.1.0 milestone Oct 21, 2019
Copy link
Member

@keeshux keeshux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I assume this was also tested live, correct?

@@ -202,6 +202,9 @@ extension OpenVPN {
/// Sends periodical keep-alive packets if set.
public var keepAliveInterval: TimeInterval?

/// Disconnects after no keep-alive packets are recieved within timeout interval if set.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "recieved".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

@rob-patchett
Copy link
Author

Yeah, I have tested this live, for configurations with and without the added option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants