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
This commit is contained in:
Fabio Alessandrelli 2017-01-18 21:33:55 +01:00
parent fa0cb7da0e
commit 68dc969f8c
2 changed files with 2 additions and 0 deletions

View file

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

View file

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