Postpone keys setup until after PUSH_REPLY
And rename to setupEncryption() for ambiguity with SessionKey.
This commit is contained in:
parent
0360a32d33
commit
c01ac7e1e3
|
@ -848,8 +848,6 @@ public class SessionProxy {
|
|||
return
|
||||
}
|
||||
|
||||
setupKeys()
|
||||
|
||||
negotiationKey.controlState = .preIfConfig
|
||||
nextPushRequestDate = Date().addingTimeInterval(negotiationKey.softReset ? CoreConfiguration.softResetDelay : CoreConfiguration.retransmissionLimit)
|
||||
pushRequest()
|
||||
|
@ -891,6 +889,8 @@ public class SessionProxy {
|
|||
return
|
||||
}
|
||||
|
||||
setupEncryption()
|
||||
|
||||
authenticator = nil
|
||||
negotiationKey.startHandlingPackets(
|
||||
withPeerId: peerId,
|
||||
|
@ -1007,7 +1007,7 @@ public class SessionProxy {
|
|||
}
|
||||
|
||||
// Ruby: setup_keys
|
||||
private func setupKeys() {
|
||||
private func setupEncryption() {
|
||||
guard let auth = authenticator else {
|
||||
fatalError("Setting up keys without having authenticated")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue