ENet wrapper properly detect disconnect on poll
Now PacketPeerUDP.get_available_packet_count() return -1 if the socket is in error state.
This commit is contained in:
parent
d3108985e0
commit
7de28be764
3 changed files with 5 additions and 4 deletions
|
|
@ -42,7 +42,7 @@ int PacketPeerUDPWinsock::get_available_packet_count() const {
|
|||
|
||||
Error err = const_cast<PacketPeerUDPWinsock *>(this)->_poll(false);
|
||||
if (err != OK)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
return queue_count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue