summaryrefslogtreecommitdiffstats
path: root/thirdparty/enet/godot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/enet/godot.cpp')
-rw-r--r--thirdparty/enet/godot.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp
index 2cbfe59fc6..9ce126a475 100644
--- a/thirdparty/enet/godot.cpp
+++ b/thirdparty/enet/godot.cpp
@@ -535,6 +535,10 @@ int enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buf
if (err == ERR_BUSY) {
return 0;
}
+ if (err == ERR_OUT_OF_MEMORY) {
+ // A packet above the ENET_PROTOCOL_MAXIMUM_MTU was received.
+ return -2;
+ }
if (err != OK) {
return -1;