Topic Path: Symbol Reference > Classes > TIdCustomTCPServer Class > TIdCustomTCPServer Properties > TerminateWaitTime Property
ContentsIndexHome
PreviousUpNext
TIdCustomTCPServer.TerminateWaitTime Property

Specifies the time a server should wait while terminating executable tasks for client connections.

property TerminateWaitTime: Integer;

TerminateWaitTime is an Integer property that identifies the total number of milliseconds that the server should wait while terminating the executable tasks for client connections. 

TerminateWaitTime is an aggregate delay time used while monitoring the thread list in Contexts during server shutdown. The length of the Contexts thread list is checked every 250ms until TerminateWaitTime has elapsed, or the length of the list is 0 (zero). If the value in TerminateWaitTime is exceeded before the length of Contexts reaches 0 (zero), an exception is raised. 

The default value for TerminateWaitTime is 5000 (5 seconds). Use a larger value in TerminateWaitTime when the server allows a large number of client connections in MaxConnections, or when OnDisconnected event handling for the client connection involves time intensive operations.

TerminateWaitTime is not used at the current time. Needs to be reimplemented in TerminateAllThreads, TerminateListenerThreads.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.