Skip to content

Commit

Permalink
[inner-1591] fix hang
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyh1 committed Jan 10, 2022
1 parent 3e60ef0 commit a61f981
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,11 @@ public void connectionClose(@NotNull AbstractService service, String closeReason
lock.lock();
try {
responseService.setResponseHandler(null);
if (writeToClientFlag.compareAndSet(false, true)) {
setErrPkg(errMsg0, ErrorCode.ER_ABORTING_CONNECTION);
if (decrementToZero(node, STATUS_CONN_CLOSE)) {
specialHandling(false, this.getErrMsg());
this.err.setPacketId(session.getShardingService().nextPacketId());
handleEndPacket(this.err);
}
setErrPkg(errMsg0, ErrorCode.ER_ABORTING_CONNECTION);
if (decrementToZero(node, STATUS_CONN_CLOSE) && writeToClientFlag.compareAndSet(false, true)) {
specialHandling(false, this.getErrMsg());
this.err.setPacketId(session.getShardingService().nextPacketId());
handleEndPacket(this.err);
}
} finally {
lock.unlock();
Expand Down

0 comments on commit a61f981

Please sign in to comment.