From 1b99806b478b823ff04ad0e2538e211e55c037cb Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 2 Sep 2018 05:32:12 +0200 Subject: Unify PacketPeerUDP using NetSocket --- thirdparty/enet/godot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'thirdparty/enet') diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp index 177848f96b..6ba7cf0000 100644 --- a/thirdparty/enet/godot.cpp +++ b/thirdparty/enet/godot.cpp @@ -108,7 +108,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) { ENetSocket enet_socket_create(ENetSocketType type) { - PacketPeerUDP *socket = PacketPeerUDP::create(); + PacketPeerUDP *socket = memnew(PacketPeerUDP); socket->set_blocking_mode(false); return socket; @@ -151,7 +151,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu err = sock->put_packet((const uint8_t *)&w[0], size); if (err != OK) { - if (err == ERR_UNAVAILABLE) { // blocking call + if (err == ERR_BUSY) { // Blocking call return 0; } -- cgit v1.2.3