Skip to content

Commit

Permalink
Use notifyAll instead of notify
Browse files Browse the repository at this point in the history
HTTP/2 could have multiple threads waiting on the connection, so we need to wake up all of them.

In future we could move to a park/unpark based approach but it would need some performance testing.

Fixes quarkusio#28116
  • Loading branch information
stuartwdouglas authored and igorregis committed Oct 16, 2022
1 parent ea0ca58 commit d847e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void handle(Void event) {
synchronized (connection) {
eof = true;
if (waiting) {
connection.notify();
connection.notifyAll();
}
}
}
Expand All @@ -212,7 +212,7 @@ public void handle(Throwable event) {
}
}
if (waiting) {
connection.notify();
connection.notifyAll();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void handle(Void event) {
synchronized (connection) {
eof = true;
if (waiting) {
connection.notify();
connection.notifyAll();
}
}
}
Expand All @@ -212,7 +212,7 @@ public void handle(Throwable event) {
}
}
if (waiting) {
connection.notify();
connection.notifyAll();
}
}
}
Expand Down

0 comments on commit d847e36

Please sign in to comment.