Skip to content

Commit

Permalink
Do not close connection by url when connection closed. (sofastack#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhiyuan authored and ujjboy committed Feb 20, 2019
1 parent 83833b6 commit adf9544
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public Connection getConnection(RpcClient rpcClient, ClientTransportConfig trans
if (LOGGER.isWarnEnabled()) {
LOGGER.warn("Multiple threads init ClientTransport with same key:" + url);
}
connection.close(); //如果同时有人插入,则使用第一个
rpcClient.closeStandaloneConnection(connection); //如果同时有人插入,则使用第一个
connection = oldConnection;
} else {

Expand Down Expand Up @@ -188,7 +188,7 @@ public void closeConnection(RpcClient rpcClient, ClientTransportConfig transport
}
}
if (needDestroy) {
rpcClient.closeConnection(url);
rpcClient.closeStandaloneConnection(connection);
}
}
}

0 comments on commit adf9544

Please sign in to comment.