We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef0257f commit a5fa38cCopy full SHA for a5fa38c
core/src/main/java/io/grpc/internal/DelayedStream.java
@@ -89,11 +89,16 @@ final void setStream(ClientStream stream) {
89
passThrough = true;
90
break;
91
}
92
+ // Since there were pendingCalls, we need to process them. To maintain ordering we can't set
93
+ // passThrough=true until we run all pendingCalls, but new Runnables may be added after we
94
+ // drop the lock. So we will have to re-check pendingCalls.
95
List<Runnable> tmp = toRun;
96
toRun = pendingCalls;
97
pendingCalls = tmp;
98
99
for (Runnable runnable : toRun) {
100
+ // Must not call transport while lock is held to prevent deadlocks.
101
+ // TODO(ejona): exception handling
102
runnable.run();
103
104
toRun.clear();
0 commit comments