File tree Expand file tree Collapse file tree
servlet/src/main/java/io/grpc/servlet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,13 +222,11 @@ private void runOrBuffer(ActionItem actionItem) throws IOException {
222222 if (actionItem == completeAction ) {
223223 return ;
224224 }
225- if (!isReady .getAsBoolean ()) {
226- boolean successful =
227- writeState .compareAndSet (curState , curState .withReadyAndDrained (false ));
228- LockSupport .unpark (parkingThread );
229- checkState (successful , "Bug: curState is unexpectedly changed by another thread" );
230- log .finest ("the servlet output stream becomes not ready" );
231- }
225+ boolean successful =
226+ writeState .compareAndSet (curState , curState .withReadyAndDrained (false ));
227+ LockSupport .unpark (parkingThread );
228+ checkState (successful , "Bug: curState is unexpectedly changed by another thread" );
229+ log .finest ("the servlet output stream becomes not ready" );
232230 } else { // buffer to the writeChain
233231 writeChain .offer (actionItem );
234232 if (!writeState .compareAndSet (curState , curState .withReadyAndDrained (false ))) {
You can’t perform that action at this time.
0 commit comments