diff options
Diffstat (limited to 'ext/kgio/accept.c')
-rw-r--r-- | ext/kgio/accept.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/kgio/accept.c b/ext/kgio/accept.c index 4a45e2f..c847c92 100644 --- a/ext/kgio/accept.c +++ b/ext/kgio/accept.c @@ -160,6 +160,12 @@ static VALUE in_addr_set(VALUE io, struct sockaddr_storage *addr, socklen_t len) return rb_ivar_set(io, iv_kgio_addr, host); } +#if defined(__linux__) +# define post_accept kgio_autopush_accept +#else +# define post_accept(a,b) for(;0;) +#endif + static VALUE my_accept(struct accept_args *a, int force_nonblock) { @@ -205,6 +211,7 @@ retry: } } client_io = sock_for_fd(a->accepted_class, client_fd); + post_accept(a->accept_io, client_io); if (a->addr) in_addr_set(client_io, |