mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8185072: network006 times out in many configs in JDK10-hs nightly
Reviewed-by: chegar, rriggs
This commit is contained in:
parent
06e15f6982
commit
99b202b398
2 changed files with 890 additions and 7 deletions
|
@ -679,14 +679,16 @@ Java_java_net_PlainSocketImpl_socketAccept(JNIEnv *env, jobject this,
|
|||
}
|
||||
|
||||
/* ECONNABORTED or EWOULDBLOCK error so adjust timeout if there is one. */
|
||||
currNanoTime = JVM_NanoTime(env, 0);
|
||||
nanoTimeout -= (currNanoTime - prevNanoTime);
|
||||
if (nanoTimeout < NET_NSEC_PER_MSEC) {
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
|
||||
"Accept timed out");
|
||||
return;
|
||||
if (nanoTimeout >= NET_NSEC_PER_MSEC) {
|
||||
currNanoTime = JVM_NanoTime(env, 0);
|
||||
nanoTimeout -= (currNanoTime - prevNanoTime);
|
||||
if (nanoTimeout < NET_NSEC_PER_MSEC) {
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
|
||||
"Accept timed out");
|
||||
return;
|
||||
}
|
||||
prevNanoTime = currNanoTime;
|
||||
}
|
||||
prevNanoTime = currNanoTime;
|
||||
}
|
||||
|
||||
if (newfd < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue