Skip to content

Commit

Permalink
Fix invoker ignored to destroy when unlock failed (#13123)
Browse files Browse the repository at this point in the history
* Fix invoker ignored to destroy when unlock failed

* update code
  • Loading branch information
AlbumenJ authored Sep 26, 2023
1 parent 66eaadd commit 5aa99c5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ public void destroy() {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
lock.writeLock().unlock();
try {
lock.writeLock().unlock();
} catch (IllegalMonitorStateException ignore) {
// ignore if lock failed, maybe in a long invoke
} catch (Throwable t) {
logger.warn(LoggerCodeConstants.PROTOCOL_CLOSED_SERVER, "", "",
"Unexpected error occurred when releasing write lock, cause: " + t.getMessage(), t);
}
}
invoker.destroy();
}
Expand Down

0 comments on commit 5aa99c5

Please sign in to comment.