- This topic has 3 replies, 2 voices, and was last updated 5 years, 2 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Hello,
Shouldn’t ConnectionPool.KillConnections kill all connections even the live ones ? (without waiting to be timeout)
If no, how can i kill all connections without waiting to be timeout ?
Thank you
Are we talking about client transport connection pool or database connection pool?
If client transport connection pool (Indy) then it will use Indy’s Disconnect method in the end, without options, which means it will attempt to disconnect gracefully (notifying the peer), which will hang until timeout if not responded to per the TCP/IP standard.
I have however added a DisconnectGracefully boolean property (default true) for next release for all client side Indy transports. It can be set to false before a Disconnect or connection pool kill connections, to force non graceful connection shutdown.
Hello Kim,
Client!
If client transport connection pool (Indy) then it will use Indy’s Disconnect method in the end, without options, which means it will attempt to disconnect gracefully (notifying the peer), which will hang until timeout if not responded to per the TCP/IP standard.
Well the if client internet or server is down for whatever reason there is no point to wait …
I have however added a DisconnectGracefully boolean property (default true) for next release for all client side Indy transports. It can be set to false before a Disconnect or connection pool kill connections, to force non graceful connection shutdown.
So the killconnections will have an extra parameter ?
Currently i do this after i detect a disconnection or timeout:
Client.Disconnect;
ConnectionPool.KillConnections;
InQueue.Clear;
OutQueue.Clear;
Thank you
There will be no additional arguments to KillConnections, but a boolean property extra on the transport component: DisconnectGracefully