From 872eafef0652f67af51a5926a374c84176f24c4b Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 7 Nov 2018 17:28:44 +1000 Subject: [PATCH] Issue #2858 upgrade jnr-unixsocket to 0.19 (#2859) * upgrade jnr-unixsocket to 0.19 #2858 Signed-off-by: olivier lamy * remove hack as issue has been fixed on jnr project Signed-off-by: olivier lamy * upgrade jnr-unixsocket to 0.20 Signed-off-by: olivier lamy --- .../jetty/unixsocket/UnixSocketEndPoint.java | 46 ------------------- pom.xml | 2 +- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/jetty-unixsocket/src/main/java/org/eclipse/jetty/unixsocket/UnixSocketEndPoint.java b/jetty-unixsocket/src/main/java/org/eclipse/jetty/unixsocket/UnixSocketEndPoint.java index 3fac0fbe26d..8f798e22e3b 100644 --- a/jetty-unixsocket/src/main/java/org/eclipse/jetty/unixsocket/UnixSocketEndPoint.java +++ b/jetty-unixsocket/src/main/java/org/eclipse/jetty/unixsocket/UnixSocketEndPoint.java @@ -75,50 +75,4 @@ public class UnixSocketEndPoint extends ChannelEndPoint LOG.debug(e); } } - - - @Override - public boolean flush(ByteBuffer... buffers) throws IOException - { - // TODO this is a work around for https://github.com/jnr/jnr-unixsocket/issues/50 - long flushed=0; - try - { - for (ByteBuffer b : buffers) - { - if (b.hasRemaining()) - { - int r=b.remaining(); - int p=b.position(); - int l=_channel.write(b); - if (l>=0) - { - b.position(p+l); - flushed+=l; - } - - if (CEPLOG.isDebugEnabled()) - CEPLOG.debug("flushed {}/{} r={} {}", l,r,b.remaining(), this); - - if (b.hasRemaining()) - break; - } - } - - } - catch (IOException e) - { - throw new EofException(e); - } - - if (flushed>0) - notIdle(); - - for (ByteBuffer b : buffers) - if (!BufferUtil.isEmpty(b)) - return false; - - return true; - } - } diff --git a/pom.xml b/pom.xml index 4fd3fe4cd53..45e08653987 100644 --- a/pom.xml +++ b/pom.xml @@ -1022,7 +1022,7 @@ com.github.jnr jnr-unixsocket - 0.18 + 0.20 junit