Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : Indy 10 problems accessing locklist in onexecute
| Subject: | Indy 10 problems accessing locklist in onexecute |
| Posted by: | "Marko Lahtinen" (mar..@deston.fi) |
| Date: | Mon, 21 Apr 2008 22:19:00 |
Hello!
Im storing a simple class in TCPServers AContext.data. In onExecute event I
try to send a list of ids stored in the class (TClient). I go through the
connections with and send the data with:
for iX := 0 to TCPServer.Contexts.LockList.Count - 1 do
begin
msg := msg +
TClient(TIdContext(TCPServer.Contexts.LockLIst.items[iX]).Data).ID;
end;
TCPServer.Contexts.UnlockList;
AContext.Connection.Socket.WriteLn(msg);
This works fine until other client tries to do something or tries to connect
to server.The client getting the list works fine, but all other clients hang
and no more connection can be made.
What am I doing wrong?
Any advice?
Thanks,
Marko