Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private void setWriterConnection(final Connection writerConnection,

private void setReaderConnection(final Connection conn, final HostSpec host) {
closeReaderConnectionIfIdle(this.readerConnection);
this.readerConnection = new CacheItem<>(conn, this.getKeepAliveTimeout(host));
this.readerConnection = new CacheItem<>(conn, this.getKeepAliveTimeout(this.isReaderConnFromInternalPool));
this.readerHostSpec = host;
LOGGER.finest(
() -> Messages.get(
Expand Down Expand Up @@ -534,8 +534,8 @@ private boolean isConnectionUsable(final Connection connection) throws SQLExcept
return connection != null && !connection.isClosed();
}

private long getKeepAliveTimeout(final HostSpec host) {
if (this.pluginService.isPooledConnectionProvider(host, properties)) {
private long getKeepAliveTimeout(boolean isPooledConnection) {
if (isPooledConnection) {
// Let the connection pool handle the lifetime of the reader connection.
return 0;
}
Expand Down
Loading