Fix bug causing UDP socket to close after the first send if not listening

The ring buffer for receiving packets was not resized in constructor

(cherry picked from commit 68dc969f8c)
This commit is contained in:
Fabio Alessandrelli 2017-01-18 21:33:55 +01:00
parent cab9ad7657
commit 7dbccc9a57
2 changed files with 2 additions and 0 deletions

View file

@ -269,6 +269,7 @@ PacketPeerUDPPosix::PacketPeerUDPPosix() {
queue_count = 0;
peer_port = 0;
sock_type = IP::TYPE_NONE;
rb.resize(8);
}
PacketPeerUDPPosix::~PacketPeerUDPPosix() {

View file

@ -278,6 +278,7 @@ PacketPeerUDPWinsock::PacketPeerUDPWinsock() {
queue_count = 0;
peer_port = 0;
sock_type = IP::TYPE_NONE;
rb.resize(8);
}
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {