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 {
|
if let keepAliveSeconds = keepAliveSeconds {
|
||||||
log.info("Keep-alive: \(keepAliveSeconds) seconds")
|
log.info("Keep-alive: \(keepAliveSeconds) seconds")
|
||||||
} else {
|
} else {
|
||||||
log.info("Keep-alive: disabled")
|
log.info("Keep-alive: default")
|
||||||
}
|
}
|
||||||
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
|
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
|
||||||
log.info("Renegotiation: \(renegotiatesAfterSeconds) seconds")
|
log.info("Renegotiation: \(renegotiatesAfterSeconds) seconds")
|
||||||
|
|
|
@ -227,7 +227,6 @@ open class TunnelKitProvider: NEPacketTunnelProvider {
|
||||||
if let renegotiatesAfterSeconds = cfg.renegotiatesAfterSeconds {
|
if let renegotiatesAfterSeconds = cfg.renegotiatesAfterSeconds {
|
||||||
sessionConfiguration.renegotiatesAfter = TimeInterval(renegotiatesAfterSeconds)
|
sessionConfiguration.renegotiatesAfter = TimeInterval(renegotiatesAfterSeconds)
|
||||||
}
|
}
|
||||||
sessionConfiguration.keepAliveInterval = CoreConfiguration.pingInterval
|
|
||||||
|
|
||||||
let proxy: SessionProxy
|
let proxy: SessionProxy
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -152,7 +152,7 @@ extension SessionProxy {
|
||||||
clientCertificatePath = nil
|
clientCertificatePath = nil
|
||||||
clientKeyPath = nil
|
clientKeyPath = nil
|
||||||
compressionFraming = .disabled
|
compressionFraming = .disabled
|
||||||
keepAliveInterval = nil
|
keepAliveInterval = CoreConfiguration.pingInterval
|
||||||
renegotiatesAfter = nil
|
renegotiatesAfter = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue