ConnectionPool.KillConnections and timeout

Home Forums kbmMW ConnectionPool.KillConnections and timeout

Viewing 2 reply threads
  • Author
    Posts
    • #55283
      Babis Michael
      Participant

      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

    • #55288
      kimbomadsen
      Keymaster

      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.

       

      • #55292
        Babis Michael
        Participant

        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

    • #55303
      kimbomadsen
      Keymaster

      There will be no additional arguments to KillConnections, but a boolean property extra on the transport component: DisconnectGracefully

Viewing 2 reply threads
  • You must be logged in to reply to this topic.