Move default pingInterval to constructor

Use CoreConfiguration only within Core.
This commit is contained in:
Davide De Rosa 2018-09-07 22:16:04 +02:00
parent 65468207cb
commit 582ef4875d
3 changed files with 2 additions and 3 deletions

View File

@ -529,7 +529,7 @@ extension TunnelKitProvider {
if let keepAliveSeconds = keepAliveSeconds {
log.info("Keep-alive: \(keepAliveSeconds) seconds")
} else {
log.info("Keep-alive: disabled")
log.info("Keep-alive: default")
}
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
log.info("Renegotiation: \(renegotiatesAfterSeconds) seconds")

View File

@ -227,7 +227,6 @@ open class TunnelKitProvider: NEPacketTunnelProvider {
if let renegotiatesAfterSeconds = cfg.renegotiatesAfterSeconds {
sessionConfiguration.renegotiatesAfter = TimeInterval(renegotiatesAfterSeconds)
}
sessionConfiguration.keepAliveInterval = CoreConfiguration.pingInterval
let proxy: SessionProxy
do {

View File

@ -152,7 +152,7 @@ extension SessionProxy {
clientCertificatePath = nil
clientKeyPath = nil
compressionFraming = .disabled
keepAliveInterval = nil
keepAliveInterval = CoreConfiguration.pingInterval
renegotiatesAfter = nil
}