Move default pingInterval to constructor
Use CoreConfiguration only within Core.
This commit is contained in:
parent
65468207cb
commit
582ef4875d
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -152,7 +152,7 @@ extension SessionProxy {
|
|||
clientCertificatePath = nil
|
||||
clientKeyPath = nil
|
||||
compressionFraming = .disabled
|
||||
keepAliveInterval = nil
|
||||
keepAliveInterval = CoreConfiguration.pingInterval
|
||||
renegotiatesAfter = nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue