1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Avoid calling close when polling a UDP peer without socket

This commit is contained in:
Fabio Alessandrelli
2017-01-18 10:48:50 +01:00
parent 8e84e53ebb
commit e4b9b37ccf
2 changed files with 7 additions and 0 deletions

View File

@@ -157,6 +157,10 @@ Error PacketPeerUDPPosix::wait() {
Error PacketPeerUDPPosix::_poll(bool p_wait) {
if (sockfd==-1) {
return FAILED;
}
struct sockaddr_storage from = {0};
socklen_t len = sizeof(struct sockaddr_storage);
int ret;