Override framing with pushed if available

This commit is contained in:
Davide De Rosa 2018-09-07 15:11:44 +02:00
parent 0304c4a5eb
commit e5918d1b05
1 changed files with 5 additions and 1 deletions

View File

@ -1031,6 +1031,10 @@ public class SessionProxy {
log.debug("Set up encryption")
}
let pushedFraming = pushReply.compressionFraming
if let negFraming = pushedFraming {
log.debug("Negotiated compression framing: \(negFraming.rawValue)")
}
let pushedCipher = pushReply.cipher
if let negCipher = pushedCipher {
log.debug("Negotiated cipher: \(negCipher.rawValue)")
@ -1054,7 +1058,7 @@ public class SessionProxy {
encrypter: bridge.encrypter(),
decrypter: bridge.decrypter(),
peerId: pushReply.peerId ?? PacketPeerIdDisabled,
compressionFraming: configuration.compressionFraming.native,
compressionFraming: (pushedFraming ?? configuration.compressionFraming).native,
maxPackets: link?.packetBufferSize ?? 200,
usesReplayProtection: CoreConfiguration.usesReplayProtection
)