Skip to content

Commit

Permalink
Merge pull request #20122 from stuartwdouglas/fix-deadlock
Browse files Browse the repository at this point in the history
Fix deadlock on write
  • Loading branch information
stuartwdouglas authored Sep 15, 2021
2 parents d35d508 + af17444 commit 0d08085
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ public void write(boolean errorStream, String s) {
}

StringBuilder buffer = new StringBuilder();
if (!shouldWrite(errorStream, s)) {
return;
}
synchronized (this) {
if (!shouldWrite(errorStream, s)) {
return;
}
if (totalStatusLines == 0) {
bottomBlankSpace = 0; //just to be safe, will only happen if status is added then removed, which is not really likely
writeQueue.add(s);
Expand Down

0 comments on commit 0d08085

Please sign in to comment.