Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
package org.jruby.ext.socket;

import java.io.IOException;
import java.net.BindException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
@@ -159,6 +160,9 @@ else if (host instanceof RubyFixnum) {
catch (UnknownHostException e) {
throw SocketUtils.sockerr(runtime, "bind: name or service not known");
}
catch (BindException e) {
throw runtime.newErrnoEADDRFromBindException(e);
}
catch (SocketException e) {
final String message = e.getMessage();
if ( message != null ) {

0 comments on commit 1d21abc

Please sign in to comment.