From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 5BF1E235 for ; Tue, 15 Jan 2019 04:31:22 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x0F3VLRS029204; Tue, 15 Jan 2019 12:31:21 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 40A88638AAC; Tue, 15 Jan 2019 12:31:21 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 2916A638AA3; Tue, 15 Jan 2019 12:31:21 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Tue, 15 Jan 2019 12:29:06 +0900 Message-Id: <1547522948-10285-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547522948-10285-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1547522948-10285-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/4] primary: change interval to retry connection X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 03:31:23 -0000 From: Yasufumi Ogawa This update is to change interval time of connection retry from fixed `sleep(1)` to `usleep(CONN_RETRY_USEC)` to be configurable. Signed-off-by: Yasufumi Ogawa --- src/primary/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primary/main.c b/src/primary/main.c index 12b86e5..81d1aec 100644 --- a/src/primary/main.c +++ b/src/primary/main.c @@ -414,7 +414,7 @@ main(int argc, char *argv[]) while (on) { ret = do_connection(&connected, &sock); if (ret < 0) { - sleep(1); + usleep(CONN_RETRY_USEC); continue; } -- 2.17.1