mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-12 11:36:29 +02:00
handle double handshake in Connection
This commit is contained in:
parent
3a918eedca
commit
1da9eeab1f
1 changed files with 6 additions and 2 deletions
|
@ -620,8 +620,12 @@ void Connection::processNAK(std::unique_ptr<ControlPacket> controlPacket) {
|
|||
}
|
||||
|
||||
void Connection::processHandshake(std::unique_ptr<ControlPacket> controlPacket) {
|
||||
// server sent us a handshake - we need to assume this means state should be reset
|
||||
resetReceiveState();
|
||||
|
||||
if (!_hasReceivedHandshake || _hasReceivedFirstPacket) {
|
||||
// server sent us a handshake - we need to assume this means state should be reset
|
||||
// as long as we haven't received a handshake yet or we have and we've received some data
|
||||
resetReceiveState();
|
||||
}
|
||||
|
||||
// immediately respond with a handshake ACK
|
||||
static auto handshakeACK = ControlPacket::create(ControlPacket::HandshakeACK, 0);
|
||||
|
|
Loading…
Reference in a new issue