We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
1 parent 3011d3d commit 99b7edcCopy full SHA for 99b7edc
core/src/main/java/org/jruby/Ruby.java
@@ -172,6 +172,7 @@
172
import java.lang.invoke.MethodHandle;
173
import java.lang.ref.WeakReference;
174
import java.net.BindException;
175
+import java.net.PortUnreachableException;
176
import java.nio.channels.ClosedChannelException;
177
import java.nio.charset.Charset;
178
import java.security.SecureRandom;
@@ -4080,6 +4081,8 @@ public RaiseException newIOErrorFromException(final IOException ex) {
4080
4081
}
4082
4083
return newRaiseException(getIOError(), errorMessage);
4084
+ } else if (ex instanceof PortUnreachableException) {
4085
+ throw newErrnoECONNREFUSEDError();
4086
4087
return newRaiseException(getIOError(), "IO Error");
4088
0 commit comments