Send PUSH_REQUEST immediately after auth

First call would always fail otherwise.
This commit is contained in:
Davide De Rosa 2019-07-09 12:39:54 +02:00
parent 40139cbef0
commit 2c56a8ea95
2 changed files with 2 additions and 3 deletions

View File

@ -57,8 +57,6 @@ extension CoreConfiguration {
static let retransmissionLimit = 0.1
static let softResetDelay = 5.0
static let softNegotiationTimeout = 120.0
// MARK: Authentication

View File

@ -871,8 +871,9 @@ public class OpenVPNSession: Session {
}
negotiationKey.controlState = .preIfConfig
nextPushRequestDate = Date().addingTimeInterval(isRenegotiating ? CoreConfiguration.OpenVPN.softResetDelay : CoreConfiguration.OpenVPN.retransmissionLimit)
nextPushRequestDate = Date()
pushRequest()
nextPushRequestDate?.addTimeInterval(isRenegotiating ? CoreConfiguration.OpenVPN.pushRequestInterval : CoreConfiguration.OpenVPN.retransmissionLimit)
}
for message in auth.parseMessages() {