Merge "Don't throw in socket_read if socket_read_all returns < 0" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-05-17 01:19:53 +00:00
committed by Android (Google) Code Review

View File

@@ -257,7 +257,7 @@ static jint socket_read (JNIEnv *env, jobject object, jobject fileDescriptor)
err = socket_read_all(env, object, fd, &buf, 1);
if (err < 0) {
jniThrowIOException(env, errno);
// socket_read_all has already thrown
return (jint)0;
}