src/java.base/windows/native/libnio/ch/SocketDispatcher.c
branchniosocketimpl-branch
changeset 57274 07b6be5d9150
parent 57237 a0ad3ffd7b60
child 57278 bf925a3ee68a
--- a/src/java.base/windows/native/libnio/ch/SocketDispatcher.c	Mon Mar 18 19:59:05 2019 +0000
+++ b/src/java.base/windows/native/libnio/ch/SocketDispatcher.c	Wed Mar 20 13:54:50 2019 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
             return IOS_UNAVAILABLE;
         }
         if (theErr == WSAECONNRESET) {
-            JNU_ThrowIOException(env, "Connection reset by peer");
+            JNU_ThrowByName(env, "sun/net/ConnectionResetException", "Connection reset");
         } else {
             JNU_ThrowIOExceptionWithLastError(env, "Read failed");
         }
@@ -133,7 +133,7 @@
             return IOS_UNAVAILABLE;
         }
         if (theErr == WSAECONNRESET) {
-            JNU_ThrowIOException(env, "Connection reset by peer");
+            JNU_ThrowByName(env, "sun/net/ConnectionResetException", "Connection reset");
         } else {
             JNU_ThrowIOExceptionWithLastError(env, "Vector read failed");
         }