diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2020-02-26 00:07:14 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2020-02-26 00:07:14 +0000 |
commit | 4c18554694ea91b4bf5cfc8eb060255f7535b60a (patch) | |
tree | 3f42f5da0149692d15459bf2e18f29e193534fb3 /java | |
parent | lang/go: update to 1.14 (diff) |
Ignore ECONNRESET when closing a socket
See https://github.com/battleblow/openjdk-jdk11u/issues/94 for details
Notes
Notes:
svn path=/head/; revision=527146
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk11/Makefile | 1 | ||||
-rw-r--r-- | java/openjdk11/files/patch-src_java.base_unix_native_libnio_ch_FileDispatcherImpl.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile index e45cc8443f94..c8fe087efbb6 100644 --- a/java/openjdk11/Makefile +++ b/java/openjdk11/Makefile @@ -3,6 +3,7 @@ PORTNAME= openjdk DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} +PORTREVISION= 1 CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} diff --git a/java/openjdk11/files/patch-src_java.base_unix_native_libnio_ch_FileDispatcherImpl.c b/java/openjdk11/files/patch-src_java.base_unix_native_libnio_ch_FileDispatcherImpl.c new file mode 100644 index 000000000000..49b642a29db2 --- /dev/null +++ b/java/openjdk11/files/patch-src_java.base_unix_native_libnio_ch_FileDispatcherImpl.c @@ -0,0 +1,11 @@ +--- src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c ++++ src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c +@@ -291,7 +291,7 @@ Java_sun_nio_ch_FileDispatcherImpl_release0(JNIEnv *env, jobject this, + static void closeFileDescriptor(JNIEnv *env, int fd) { + if (fd != -1) { + int result = close(fd); +- if (result < 0) ++ if (result < 0 && errno != ECONNRESET) + JNU_ThrowIOExceptionWithLastError(env, "Close failed"); + } + } |