Skip to content

Commit

Permalink
Prevent race condition in JettyConnector
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Supol <jan.supol@oracle.com>
  • Loading branch information
jansupol authored and senivam committed Jul 23, 2020
1 parent 03d8a72 commit 3ff9de8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ public void onContent(final Response jettyResponse, final ByteBuffer content) {
@Override
public void onComplete(final Result result) {
entityStream.closeQueue();
callback.response(jerseyResponse.get());
if (!callbackInvoked.get()) {
callback.response(jerseyResponse.get());
}
responseFuture.complete(jerseyResponse.get());
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@
<jaxrs.api.spec.version>2.1</jaxrs.api.spec.version>
<jaxrs.api.impl.version>2.1.6</jaxrs.api.impl.version>
<jetty.plugin.version>6.1.26</jetty.plugin.version>
<jetty.version>9.4.27.v20200227</jetty.version>
<jetty.version>9.4.28.v20200408</jetty.version>
<jetty.servlet.api.25.version>6.1.14</jetty.servlet.api.25.version>
<jsonb.api.version>1.0.2</jsonb.api.version>
<jsonp.ri.version>1.1.6</jsonp.ri.version>
Expand Down

0 comments on commit 3ff9de8

Please sign in to comment.