Skip to content

Commit

Permalink
Also fix EMSGSIZE on Alpine Linux. Relates to #4606 (#4638)
Browse files Browse the repository at this point in the history
  • Loading branch information
etehtsea authored and kares committed Jun 1, 2017
1 parent 6b6f27b commit cd91e46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
Expand Up @@ -433,6 +433,7 @@ public IRubyObject send(ThreadContext context, IRubyObject[] args) {
final String message = e.getMessage();
if (message != null) {
switch(message) {
case "Message too large": // Alpine Linux
case "Message too long":
throw runtime.newErrnoEMSGSIZEError();
}
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/runtime/Helpers.java
Expand Up @@ -276,6 +276,7 @@ public static Errno errnoFromException(Throwable t) {

case "No space left on device" : return Errno.ENOSPC;
case "Too many open files" : return Errno.EMFILE;
case "Message too large" : // Alpine Linux
case "Message too long" : return Errno.EMSGSIZE;
}
if (Platform.IS_WINDOWS && errorMessage.contains("connection was aborted")) return Errno.ECONNRESET;
Expand Down

0 comments on commit cd91e46

Please sign in to comment.