aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocol.c b/protocol.c
index 9fc6adf..e38be63 100644
--- a/protocol.c
+++ b/protocol.c
@@ -384,7 +384,8 @@ enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENet
if (mtu > ENET_PROTOCOL_MAXIMUM_MTU)
mtu = ENET_PROTOCOL_MAXIMUM_MTU;
- peer -> mtu = mtu;
+ if (mtu < peer -> mtu)
+ peer -> mtu = mtu;
if (host -> outgoingBandwidth == 0 &&
peer -> incomingBandwidth == 0)