Skip to content

Commit

Permalink
Release MessageBodyWorkers when Response gets closed.
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed Apr 13, 2022
1 parent 8f7fa99 commit 0ceb880
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -754,6 +754,7 @@ public Link.Builder getLinkBuilder(String relation) {
* @return context message body workers.
*/
public MessageBodyWorkers getWorkers() {
entityContent.ensureNotClosed();
return workers;
}

Expand Down Expand Up @@ -948,6 +949,7 @@ public boolean bufferEntity() throws ProcessingException {
*/
public void close() {
entityContent.close(true);
setWorkers(null);
}

/**
Expand Down

0 comments on commit 0ceb880

Please sign in to comment.