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:
parent
cab9ad7657
commit
7dbccc9a57
2 changed files with 2 additions and 0 deletions
|
@ -269,6 +269,7 @@ PacketPeerUDPPosix::PacketPeerUDPPosix() {
|
||||||
queue_count = 0;
|
queue_count = 0;
|
||||||
peer_port = 0;
|
peer_port = 0;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
|
rb.resize(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPeerUDPPosix::~PacketPeerUDPPosix() {
|
PacketPeerUDPPosix::~PacketPeerUDPPosix() {
|
||||||
|
|
|
@ -278,6 +278,7 @@ PacketPeerUDPWinsock::PacketPeerUDPWinsock() {
|
||||||
queue_count = 0;
|
queue_count = 0;
|
||||||
peer_port = 0;
|
peer_port = 0;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
|
rb.resize(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {
|
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {
|
||||||
|
|
Loading…
Reference in a new issue