You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2021/01/18 15:07:20 UTC
[shardingsphere] branch master updated: fix twice connections
(#9082)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 2523fa0 fix twice connections (#9082)
2523fa0 is described below
commit 2523fa0680d6324da7921241b614d52c3a9ca25b
Author: Zhang Yonglun <zh...@apache.org>
AuthorDate: Mon Jan 18 23:06:59 2021 +0800
fix twice connections (#9082)
* fix double connections
---
.../jdbc/datasource/decorator/HikariJDBCParameterDecorator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/decorator/HikariJDBCParameterDecorator.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/decorator/HikariJDBCParameterDecorator.java
index d76835a..4bf0592 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/decorator/HikariJDBCParameterDecorator.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/decorator/HikariJDBCParameterDecorator.java
@@ -39,7 +39,9 @@ public final class HikariJDBCParameterDecorator implements JDBCParameterDecorato
dataSource.getDataSourceProperties().setProperty("maintainTimeStats", Boolean.FALSE.toString());
dataSource.getDataSourceProperties().setProperty("netTimeoutForStreamingResults", "0");
dataSource.getDataSourceProperties().setProperty("tinyInt1isBit", Boolean.FALSE.toString());
- return new HikariDataSource(dataSource);
+ HikariDataSource result = new HikariDataSource(dataSource);
+ dataSource.close();
+ return result;
}
@Override