Transfer keep-alive to SessionProxy

This commit is contained in:
Davide De Rosa 2018-09-07 22:14:57 +02:00
parent fcfe1f3f68
commit 65468207cb
1 changed files with 4 additions and 1 deletions

View File

@ -221,8 +221,11 @@ open class TunnelKitProvider: NEPacketTunnelProvider {
sessionConfiguration.clientCertificatePath = clientCertificatePath
sessionConfiguration.clientKeyPath = clientKeyPath
sessionConfiguration.compressionFraming = cfg.compressionFraming
if let keepAliveSeconds = cfg.keepAliveSeconds {
sessionConfiguration.keepAliveInterval = TimeInterval(keepAliveSeconds)
}
if let renegotiatesAfterSeconds = cfg.renegotiatesAfterSeconds {
sessionConfiguration.renegotiatesAfter = Double(renegotiatesAfterSeconds)
sessionConfiguration.renegotiatesAfter = TimeInterval(renegotiatesAfterSeconds)
}
sessionConfiguration.keepAliveInterval = CoreConfiguration.pingInterval