#9765 fix race condition that can happen when one thread demands and another thread reads
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
152030de09
commit
ece6adbd33
|
@ -125,9 +125,8 @@ public abstract class HTTP3StreamConnection extends AbstractConnection
|
|||
case FRAME ->
|
||||
{
|
||||
action.getAndSet(null).run();
|
||||
// Release the network buffer here (if empty), since the application may
|
||||
// not be reading more bytes, to avoid to keep around a consumed buffer.
|
||||
tryReleaseBuffer(false);
|
||||
// Do not release the buffer here to avoid races with
|
||||
// user-spawned threads that may call Stream.read().
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue