Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle timer on each pooled connection to record the idle time elapsed #165

Merged
merged 1 commit into from
Apr 10, 2017

Commits on Apr 10, 2017

  1. Added a idle timer on each pooled connection to record the idle time …

    …elapsed.
    
    By default the connection pool will not timeout any connection inside the pool. As long as the connection is still "open", then the connection is reused.
    While a user could enable idle timeout on connections by setting `ConnectionIdleTimeout` to be a non-negative number.
    Then when reusing connections from the pool, connections that have been idle for longer than the configured time will be closed directly.
    
    Notes:
    * The timer is implemented using `Stopwatch`, the time elapsed is loosely precise.
    * The connection will not immediately be closed when idle timeout reached, instead it will be closed in the same thread that get it out of the pool.
    Zhen Li committed Apr 10, 2017
    Configuration menu
    Copy the full SHA
    00ac64c View commit details
    Browse the repository at this point in the history