hedgewars/uIO.pas
changeset 11539 c22d292e7266
parent 11532 bf86c6cb9341
child 11544 b69f5f22a3ba
child 12650 eaf719616c7b
--- a/hedgewars/uIO.pas	Mon Feb 08 14:58:36 2016 +0300
+++ b/hedgewars/uIO.pas	Tue Feb 09 14:40:06 2016 +0300
@@ -234,13 +234,13 @@
         begin
         s[0]:= char(i);
         ss:= ss + s;
-        while (Length(ss) > 1)and(Length(ss) > byte(ss[1])) do
+        while (Length(ss) > 1)and(Length(ss) > byte(ss[1])) and allOK do
             begin
             ParseIPCCommand(copy(ss, 2, byte(ss[1])));
             Delete(ss, 1, Succ(byte(ss[1])));
             end
         end
-until i = 0;
+until (i = 0) or (not allOK);
 
 close(f)
 {$I+}
@@ -328,7 +328,7 @@
 repeat
     IPCCheckSock;
     SDL_Delay(1)
-until isPonged
+until isPonged or (not allOK)
 end;
 
 procedure SendIPCAndWaitReply(s: shortstring);