From 6d811591b38485ff561c8c8491e249e234493eb1 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 8 Apr 2006 14:22:27 +0000 Subject: random sleep to make race condition harder. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3339 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index f71785e8..b4a150f4 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -586,7 +586,7 @@ multi_user_check(void) } else { fprintf(stderr, "id=%s ui->pid=0\n", cuser.userid); } - sleep(1); + usleep(random()%2000000+1000000); // 1~3s } while(getotherlogin(3) != NULL); } else { /* deny login if still have 3 */ -- cgit v1.2.3