about summary refs log tree commit homepage
diff options
context:
space:
mode:
-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);