* java/nat/natPlainSocketImpl.cc (write): Abort loop on error.

From-SVN: r51230
This commit is contained in:
Jeff Sturm 2002-03-23 14:57:39 +00:00 committed by Jeff Sturm
parent bbaa9790f3
commit a641514dc5
2 changed files with 6 additions and 0 deletions

View file

@ -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;