Skip to content

Commit dad844f

Browse files
committed
swap to add
1 parent e3cde7b commit dad844f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/StreamingHttpResultPublisher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ private ApacheClientBackpressure(HttpSettings settings) {
256256
}
257257

258258
private void addBytesAndMaybePause(long count, IOControl ioControl) {
259-
if (bytesInQueue.accumulateAndGet(count, Long::sum) >= settings.getMaxResponseSize().getBytes()) {
259+
if (bytesInQueue.addAndGet(count) >= settings.getMaxResponseSize().getBytes()) {
260260
pauseProducer(ioControl);
261261
}
262262
}

0 commit comments

Comments
 (0)