Fix handshakeRequestPacket not being thread safe

This commit is contained in:
Ryan Huffman 2016-03-21 14:07:15 -07:00
parent b7678f9818
commit c515355cff

View file

@ -410,7 +410,7 @@ bool Connection::processReceivedSequenceNumber(SequenceNumber sequenceNumber, in
if (!_hasReceivedHandshake) {
// Refuse to process any packets until we've received the handshake
// Send handshake request to re-request a handshake
static auto handshakeRequestPacket = ControlPacket::create(ControlPacket::HandshakeRequest, 0);
auto handshakeRequestPacket = ControlPacket::create(ControlPacket::HandshakeRequest, 0);
_parentSocket->writeBasePacket(*handshakeRequestPacket, _destination);
#ifdef UDT_CONNECTION_DEBUG