Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate JDBC server errors caused by disconnnect. #227

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,12 @@ boolean handleException(SQLException e) throws SQLException {
int sqlCode = e.getErrorCode();
String sqlState = e.getSQLState();
if (((sqlCode == -99999) &&
((JDError.EXC_COMMUNICATION_LINK_FAILURE.equals(sqlState)) ||
(JDError.EXC_CONNECTION_UNABLE.equals(sqlState))))
((JDError.EXC_COMMUNICATION_LINK_FAILURE.equals(sqlState)) ||
(JDError.EXC_CONNECTION_UNABLE.equals(sqlState))))
|| ( sqlCode == -7061 && should7061Reconnect(e))
|| (sqlCode == -401 && JDError.EXC_SERVER_ERROR.equals(sqlState)) /* also retry for server errors */
) {

// We do not use EXC_CONNECTION_NONE, since that is what is returned
// after the connection has been closed or aborted.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public void close ()
throw new ProxyException (ProxyException.CONNECTION_DROPPED,e);
}

// $$ Question for Jim, his new class skipped the above
// two funtions -- input_.close() and output_.close().
// $$ Question, the new class skipped the above
// two functions -- input_.close() and output_.close().
// If a good idea then remove from here as well.
try {
socket_.close ();
Expand Down
Loading