about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-16 02:00:21 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-16 02:00:21 +0000
commit30c12374f8d23f0e635946fc38546820216457bf (patch)
treed1fcb725ca8be874944ec4c3845be6fe56680f65
parent9f30805bc4ff65ad4ca0be9dfb26b1a9bdc70c51 (diff)
downloadkgio-30c12374f8d23f0e635946fc38546820216457bf.tar.gz
This may help us diagnose issues on strange OSes.
-rw-r--r--ext/kgio/accept.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/kgio/accept.c b/ext/kgio/accept.c
index 503b5e9..67a8ded 100644
--- a/ext/kgio/accept.c
+++ b/ext/kgio/accept.c
@@ -143,7 +143,9 @@ static VALUE in_addr_set(VALUE io, struct sockaddr_storage *addr, socklen_t len)
                 host_len = (long)INET6_ADDRSTRLEN;
                 break;
         default:
-                rb_raise(rb_eRuntimeError, "unsupported address family");
+                rb_raise(rb_eRuntimeError,
+                         "unsupported address family: ss_family=%lu (socklen=%ld)",
+                         (unsigned long)addr->ss_family, (long)len);
         }
         host = rb_str_new(NULL, host_len);
         host_ptr = RSTRING_PTR(host);