mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8203937: Not possible to read data from socket after write detects connection reset
Reviewed-by: chegar
This commit is contained in:
parent
ee5ff58a3d
commit
79ed34634b
3 changed files with 142 additions and 11 deletions
|
@ -108,13 +108,8 @@ Java_java_net_SocketOutputStream_socketWrite0(JNIEnv *env, jobject this,
|
|||
loff += n;
|
||||
continue;
|
||||
}
|
||||
if (errno == ECONNRESET) {
|
||||
JNU_ThrowByName(env, "sun/net/ConnectionResetException",
|
||||
"Connection reset");
|
||||
} else {
|
||||
JNU_ThrowByNameWithMessageAndLastError
|
||||
(env, "java/net/SocketException", "Write failed");
|
||||
}
|
||||
JNU_ThrowByNameWithMessageAndLastError
|
||||
(env, "java/net/SocketException", "Write failed");
|
||||
if (bufP != BUF) {
|
||||
free(bufP);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue