summaryrefslogtreecommitdiff
path: root/src/network/core/udp.cpp
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-04-18 14:49:39 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-04-25 21:27:54 +0200
commitd6000c2ec5f61c599d8859b981f2dac6a92e0755 (patch)
tree41418504a0c6e9701295228873bfc2c6d66fe313 /src/network/core/udp.cpp
parent8b302761d4ca51f41eaff4097c9afa4f3aec5ec5 (diff)
downloadopenttd-d6000c2ec5f61c599d8859b981f2dac6a92e0755.tar.xz
Codechange: differentiate between UDP, TCP and compatibility MTU values
Diffstat (limited to 'src/network/core/udp.cpp')
-rw-r--r--src/network/core/udp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index 8872fa295..e8299f7b6 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -119,8 +119,8 @@ void NetworkUDPSocketHandler::ReceivePackets()
struct sockaddr_storage client_addr;
memset(&client_addr, 0, sizeof(client_addr));
- /* The limit is SEND_MTU, but also allocate that much as we need to read the whole packet in one go. */
- Packet p(this, SEND_MTU, SEND_MTU);
+ /* The limit is UDP_MTU, but also allocate that much as we need to read the whole packet in one go. */
+ Packet p(this, UDP_MTU, UDP_MTU);
socklen_t client_len = sizeof(client_addr);
/* Try to receive anything */