mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-03-10 08:51:19 +00:00
Fix synchronisation regression leading to potential deadlock
This commit is contained in:
@@ -204,12 +204,14 @@ public class HttpClientRequestImpl extends HttpClientRequestBase implements Http
|
||||
@Override
|
||||
public synchronized boolean writeQueueFull() {
|
||||
checkEnded();
|
||||
if (stream == null) {
|
||||
// Should actually check with max queue size and not always blindly return false
|
||||
return false;
|
||||
} else {
|
||||
return stream.isNotWritable();
|
||||
synchronized (this) {
|
||||
checkEnded();
|
||||
if (stream == null) {
|
||||
// Should actually check with max queue size and not always blindly return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return stream.isNotWritable();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,8 +92,8 @@ abstract class VertxHttp2Stream<C extends Http2ConnectionBase> {
|
||||
void onWritabilityChanged() {
|
||||
synchronized (conn) {
|
||||
writable = !writable;
|
||||
handleInterestedOpsChanged();
|
||||
}
|
||||
handleInterestedOpsChanged();
|
||||
}
|
||||
|
||||
void onEnd() {
|
||||
|
||||
Reference in New Issue
Block a user