Skip to content

Commit

Permalink
Issue eclipse-ee4j#2016 Removed second deflator lock.
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
Signed-off-by: David Matějček <dmatej@seznam.cz>
  • Loading branch information
MattGill98 authored and dmatej committed Nov 20, 2020
1 parent bfbf471 commit 57c951f
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ public void onPeerWindowUpdate(final int delta) throws Http2StreamException {
break;
}
}

if (outputQueue.peek() != null && outputQueue.peek().trailer != null) {
LOGGER.warning("Trailer frame is going to get ignored.");
}
}

/**
Expand Down Expand Up @@ -409,7 +405,6 @@ public synchronized void writeDownStream(final HttpPacket httpPacket, final Filt
// !!!!! LOCK the deflater
sendTrailers(completionHandler, messageCloner, (HttpTrailer) httpContent);
}
close();
return;
}

Expand Down Expand Up @@ -651,7 +646,6 @@ private void releaseWriteQueueSpace(final int justSentBytes, final boolean isAto

private void sendTrailers(final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final HttpTrailer httpContent)
throws IOException {
http2Session.getDeflaterLock().lock();
final boolean logging = NetLogger.isActive();
final Map<String, String> capture = logging ? new HashMap<>() : null;
List<Http2Frame> trailerFrames = http2Session.encodeTrailersAsHeaderFrames(stream.getId(), new ArrayList<>(4), httpContent.getHeaders(), capture);
Expand All @@ -665,7 +659,6 @@ private void sendTrailers(final CompletionHandler<WriteResult> completionHandler
}
unflushedWritesCounter.incrementAndGet();
flushToConnectionOutputSink(trailerFrames, null, new FlushCompletionHandler(completionHandler), messageCloner, true);
http2Session.getDeflaterLock().unlock();
close();
}

Expand Down

0 comments on commit 57c951f

Please sign in to comment.