This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new 5aa99c526f Fix invoker ignored to destroy when unlock failed (#13123)
5aa99c526f is described below
commit 5aa99c526f2e089c86ad1a9e8f7d670463ec1fc7
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Sep 26 11:26:04 2023 +0800
Fix invoker ignored to destroy when unlock failed (#13123)
* Fix invoker ignored to destroy when unlock failed
* update code
---
.../apache/dubbo/rpc/protocol/ReferenceCountInvokerWrapper.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ReferenceCountInvokerWrapper.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ReferenceCountInvokerWrapper.java
index 9cca735949..4558113b72 100644
---
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ReferenceCountInvokerWrapper.java
+++
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ReferenceCountInvokerWrapper.java
@@ -66,7 +66,14 @@ public class ReferenceCountInvokerWrapper<T> implements
Invoker<T> {
} 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();
}