Atozed Forums
setting idtcpserver to false - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Indy (https://www.atozed.com/forums/forum-8.html)
+--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html)
+--- Thread: setting idtcpserver to false (/thread-862.html)



setting idtcpserver to false - Madammar - 12-09-2018

Why when i set tidtcpserver active property to false it does not disconnect all connected clients immediately ?


RE: setting idtcpserver to false - rlebeau - 12-10-2018

(12-09-2018, 06:44 PM)Madammar Wrote: Why when i set tidtcpserver active property to false it does not disconnect all connected clients immediately ?

It does, actually. It loops through the Contexts list closing every client socket that is currently connected.


RE: setting idtcpserver to false - Madammar - 12-12-2018

i see the more clients it has the longer time it takes to disconnect , i just notice it took 4 minutes to disconnect 600 clients


RE: setting idtcpserver to false - rlebeau - 12-12-2018

(12-12-2018, 12:28 AM)Madammar Wrote: i see  the more clients it has the longer time it takes to disconnect , i just notice it took 4 minutes to disconnect 600 clients

Under normal conditions, it should not take that long to disconnect so many clients. On the other hand, TIdScheduler.TerminateAllYarns() does call Sleep(500) in a loop until the ActiveYarns list is empty, so worse case scenario it may take awhile if client threads are not terminating themselves in a timely manner.