Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
Original file line number Diff line number Diff line change
@@ -44,9 +44,9 @@
import java.net.UnknownHostException;
import java.net.DatagramPacket;
import java.nio.ByteBuffer;
import java.nio.channels.AlreadyBoundException;
import java.nio.channels.Channel;
import java.nio.channels.DatagramChannel;
import java.nio.channels.IllegalBlockingModeException;
import java.nio.channels.NotYetConnectedException;

import jnr.constants.platform.AddressFamily;
@@ -189,6 +189,9 @@ else if (host instanceof RubyFixnum) {
catch (BindException e) {
throw runtime.newErrnoEADDRFromBindException(e);
}
catch (AlreadyBoundException e) {
throw runtime.newErrnoEINVALError("bind(2) for " + host.inspect() + " port " + port);
}
catch (SocketException e) {
final String message = e.getMessage();
if ( message != null ) {

0 comments on commit 68bea61

Please sign in to comment.