Merge pull request #32 from shapeblue/cw1261

CW1261: Do not reset connection for user managed connections
This commit is contained in:
Abhinandan Prateek 2017-03-29 22:54:57 +05:30 committed by GitHub
commit 9b181dbf19
1 changed files with 6 additions and 4 deletions

View File

@ -182,12 +182,14 @@ public class TransactionLegacy implements Closeable {
}
public void checkConnection() {
try {
if (_conn != null && !_conn.isValid(3)) {
if ( _dbId != CONNECTED_DB) {
try {
if (_conn != null && !_conn.isValid(3)) {
_conn = null;
}
} catch (SQLException e) {
_conn = null;
}
} catch (SQLException e) {
_conn = null;
}
}