You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2016/08/27 22:48:00 UTC
tomee git commit: TOMEE-1623 ensure the inputstream is totally empty
so it isn't incorrectly closed by the client as opposed to being kept alive
Repository: tomee
Updated Branches:
refs/heads/master 3d8d8af0e -> 231efb0db
TOMEE-1623 ensure the inputstream is totally empty so it isn't incorrectly closed by the client as opposed to being kept alive
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/231efb0d
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/231efb0d
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/231efb0d
Branch: refs/heads/master
Commit: 231efb0db11098bec1bbcd7885711e3364cb4ba6
Parents: 3d8d8af
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Sat Aug 27 23:38:39 2016 +0100
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Sat Aug 27 23:38:39 2016 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/openejb/client/Client.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/231efb0d/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
----------------------------------------------------------------------
diff --git a/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java b/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
index 837a2ea..f8e591e 100644
--- a/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
+++ b/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
@@ -405,6 +405,17 @@ public class Client {
}
if (null != in) {
+
+ // consume anything left in the buffer
+ try {
+ int read = 0;
+ while (read > -1) {
+ read = in.read();
+ }
+ } catch (Throwable e) {
+ // ignore
+ }
+
try {
in.close();
} catch (final Throwable e) {