Issue #2858 upgrade jnr-unixsocket to 0.19 (#2859)

* upgrade jnr-unixsocket to 0.19 #2858

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* remove hack as issue has been fixed on jnr project

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* upgrade jnr-unixsocket to 0.20

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2018-11-07 17:28:44 +10:00 committed by Greg Wilkins
parent ef261a39ae
commit 872eafef06
2 changed files with 1 additions and 47 deletions

View File

@ -75,50 +75,4 @@ public class UnixSocketEndPoint extends ChannelEndPoint
LOG.debug(e); 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;
}
} }

View File

@ -1022,7 +1022,7 @@
<dependency> <dependency>
<groupId>com.github.jnr</groupId> <groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId> <artifactId>jnr-unixsocket</artifactId>
<version>0.18</version> <version>0.20</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>