]> arthur.barton.de Git - netatalk.git/commitdiff
Slightly change sleep time calculation
authorFrank Lahm <franklahm@googlemail.com>
Wed, 27 Jul 2011 14:50:24 +0000 (16:50 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 27 Jul 2011 14:50:24 +0000 (16:50 +0200)
libatalk/util/server_ipc.c

index 9b152195ea14ef4710f175b102e7ec9b56a5183c..659f5a704ef779410bc8ed5160e4165d3563b5f8 100644 (file)
@@ -188,8 +188,7 @@ int reconnect_ipc(AFPObj *obj)
     close(obj->ipc_fd);
     obj->ipc_fd = -1;
 
-    srandom(getpid());
-    sleep((random() % 5) + 15);  /* give it enough time to start */
+    sleep((getpid() % 5) + 15);  /* give it enough time to start */
 
     while (retrycount++ < 10) {
         if ((obj->ipc_fd = ipc_client_uds(_PATH_AFP_IPC)) == -1) {