Skip to content

Commit 36f1dbe

Browse files
committed
Opravit kritickou chybu odpojovani panelu.
1 parent 3f75a9c commit 36f1dbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TCPServerOR.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ procedure TORTCPServer.OnTcpServerDisconnect(AContext: TIdContext);
374374

375375
try
376376
// vymazeme klienta ze vsech oblasti rizeni
377-
for oblr in (AContext.Data as TTCPORsRef).ORs do
378-
oblr.RemoveClient(AContext);
377+
for i := (AContext.Data as TTCPORsRef).ORs.Count-1 downto 0 do // do range-based for!
378+
(AContext.Data as TTCPORsRef).ORs[i].RemoveClient(AContext);
379379

380380
// ukoncime probihajici potvrzovaci sekvenci
381381
if (Assigned(TTCPORsRef(AContext.Data).potvr)) then

0 commit comments

Comments
 (0)