Pārlūkot izejas kodu

limit number of packets that can be received per iteration of protocol loop

Lee Salzman 10 gadi atpakaļ
vecāks
revīzija
6ef4e7d277
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      protocol.c

+ 3 - 1
protocol.c

@@ -1191,7 +1191,9 @@ commandError:
 static int
 enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
 {
-    for (;;)
+    int packets;
+
+    for (packets = 0; packets < 256; ++ packets)
     {
        int receivedLength;
        ENetBuffer buffer;