From 14fd81f59b6381ede4f30902001d206f4439f164 Mon Sep 17 00:00:00 2001 From: Kannan J Date: Wed, 12 Jun 2024 11:09:59 +0530 Subject: [PATCH] Adding missing synchronization in the runnable that is causing access guard violation error. (#11277) --- .../main/java/io/grpc/binder/internal/BinderTransport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binder/src/main/java/io/grpc/binder/internal/BinderTransport.java b/binder/src/main/java/io/grpc/binder/internal/BinderTransport.java index dbdcaef6908..8edab0cc2d2 100644 --- a/binder/src/main/java/io/grpc/binder/internal/BinderTransport.java +++ b/binder/src/main/java/io/grpc/binder/internal/BinderTransport.java @@ -327,7 +327,9 @@ final void shutdownInternal(Status shutdownStatus, boolean forceTerminate) { inbound.closeAbnormal(shutdownStatus); } } - notifyTerminated(); + synchronized (this) { + notifyTerminated(); + } releaseExecutors(); }); }