diff options
author | Lee Salzman <[email protected]> | 2023-03-10 14:01:19 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-10 14:01:19 -0500 |
commit | eb89a34d66ac56256de2ad27e686e85c88d04c0f (patch) | |
tree | 3a69b774bb04e070a8b5d9c0085e70aebf65f44a | |
parent | 153e10f953d949eebf262e90b72d56b2e1928ff7 (diff) | |
parent | 4faa11a243d004d8a15d5353c693dbb487ddb613 (diff) | |
download | enet-eb89a34d66ac56256de2ad27e686e85c88d04c0f.tar.gz enet-eb89a34d66ac56256de2ad27e686e85c88d04c0f.zip |
Merge pull request #222 from seragh/server-mtu
Fix MTU negotiation on server side
-rw-r--r-- | protocol.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |