Bug fix. Non-blocking SocketChannel read/write with array of ByteBuffer would throw exception instead of returning 0 bytes read/written when no more buffer space is available.

This commit is contained in:
jfrijters 2013-08-05 15:38:42 +00:00
Родитель b3c1f607be
Коммит 4424e7c316
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -409,7 +409,14 @@ namespace IKVM.NativeCode.sun.nio.ch
}
catch (System.Net.Sockets.SocketException x)
{
throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
if (x.ErrorCode == global::java.net.SocketUtil.WSAEWOULDBLOCK)
{
count = 0;
}
else
{
throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
}
}
catch (ObjectDisposedException)
{
@ -469,7 +476,14 @@ namespace IKVM.NativeCode.sun.nio.ch
}
catch (System.Net.Sockets.SocketException x)
{
throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
if (x.ErrorCode == global::java.net.SocketUtil.WSAEWOULDBLOCK)
{
count = 0;
}
else
{
throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
}
}
catch (ObjectDisposedException)
{