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:
parent
fa0cb7da0e
commit
68dc969f8c
2 changed files with 2 additions and 0 deletions
|
@ -275,6 +275,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() {
|
||||||
|
|
|
@ -290,6 +290,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…
Add table
Reference in a new issue