* java/nat/natPlainSocketImpl.cc (write): Abort loop on error.
From-SVN: r51230
This commit is contained in:
parent
bbaa9790f3
commit
a641514dc5
2 changed files with 6 additions and 0 deletions
|
@ -450,6 +450,7 @@ java::net::PlainSocketImpl::write(jint b)
|
|||
// Some errors should not cause exceptions.
|
||||
if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF)
|
||||
throw new java::io::IOException (JvNewStringUTF (strerror (errno)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -481,6 +482,7 @@ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len)
|
|||
// Some errors should not cause exceptions.
|
||||
if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF)
|
||||
throw new java::io::IOException (JvNewStringUTF (strerror (errno)));
|
||||
break;
|
||||
}
|
||||
written += r;
|
||||
len -= r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue