Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1818,18 +1818,6 @@ public PhysicalConnectionInfo createPhysicalConnection() throws SQLException {
initPhysicalConnection(conn, variables, globalVariables);
initedNanos = System.nanoTime();

boolean skipSocketTimeout = "odps".equals(dbTypeName);
if (socketTimeout > 0 && !netTimeoutError && !skipSocketTimeout) {
try {
// As SQLServer-jdbc-driver 6.1.7 can use this, see https://github.com/microsoft/mssql-jdbc/wiki/SocketTimeout
conn.setNetworkTimeout(netTimeoutExecutor, socketTimeout); // here is milliseconds defined by JDBC
} catch (SQLFeatureNotSupportedException | AbstractMethodError e) {
netTimeoutError = true;
} catch (Exception ignored) {
// ignored
}
}

// call initSqls after completing socketTimeout setting.
if (!initSqls(conn, variables, globalVariables)) {
// if no SQL has been executed yet.
Expand Down