зеркало из https://github.com/mono/ikvm-fork.git
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:
Родитель
b3c1f607be
Коммит
4424e7c316
|
@ -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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче