Skip to content

ConnectionPoolOptions

Defined in: src/core/ConnectionPool.ts:38

Options for createPooledTransferClient.

PropertyTypeDescriptionDefined in
idleTimeoutMs?numberHow long an idle session may sit unused before it is automatically disconnected. Defaults to 60_000 ms. Set to 0 to disable the timer (idle sessions persist until drainPool() is called).src/core/ConnectionPool.ts:53
keyOf?(profile: ConnectionProfile) => stringCustom pool key derivation. Receives the resolved ConnectionProfile (after TransferClient validation) and must return a string. Sessions with matching keys are pooled together; never include secrets in the key. The default derives the key from provider, host, port, and username.src/core/ConnectionPool.ts:63
maxIdlePerKey?numberMaximum number of idle sessions retained per pool key. Active leases are not counted against this limit - the cap only applies to sessions waiting in the pool. When more than maxIdlePerKey sessions become idle simultaneously, the oldest ones are disconnected. Defaults to 4.src/core/ConnectionPool.ts:47