Fix interpretation of 0 seconds

0 keep-alive = never
0 reneg seconds = never
This commit is contained in:
Davide De Rosa 2018-09-28 08:39:31 +02:00
parent c4bfa12079
commit 7b96247c72
1 changed files with 3 additions and 3 deletions

View File

@ -526,12 +526,12 @@ extension TunnelKitProvider {
}
log.info("\tMTU: \(mtu)")
log.info("\tCompression framing: \(compressionFraming)")
if let keepAliveSeconds = keepAliveSeconds {
if let keepAliveSeconds = keepAliveSeconds, keepAliveSeconds > 0 {
log.info("\tKeep-alive: \(keepAliveSeconds) seconds")
} else {
log.info("\tKeep-alive: default")
log.info("\tKeep-alive: never")
}
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds, renegotiatesAfterSeconds > 0 {
log.info("\tRenegotiation: \(renegotiatesAfterSeconds) seconds")
} else {
log.info("\tRenegotiation: never")