diff options
Diffstat (limited to 'sunrpc/svc.c')
-rw-r--r-- | sunrpc/svc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sunrpc/svc.c b/sunrpc/svc.c index 917e9a3..3ed6cee 100644 --- a/sunrpc/svc.c +++ b/sunrpc/svc.c @@ -545,6 +545,13 @@ svc_getreq_common (const int fd) } libc_hidden_nolink_sunrpc (svc_getreq_common, GLIBC_2_2) +void +__svc_wait_on_error (void) +{ + struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; + __nanosleep (&ts, NULL); +} + /* If there are no file descriptors available, then accept will fail. We want to delay here so the connection request can be dequeued; otherwise we can bounce between polling and accepting, never giving the @@ -555,8 +562,7 @@ __svc_accept_failed (void) { if (errno == EMFILE) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; - __nanosleep (&ts, NULL); + __svc_wait_on_error (); } } |