From 9d4bb0f5a7ce4aa891eba0613c073a721af4d642 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Tue, 1 Nov 2016 11:44:27 -0700 Subject: [PATCH] orchagent: Changing select time out to 1s (#119) * orchagent: Changing select time out to 1s * Add define SELECT_TIMEOUT --- orchagent/orchdaemon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index 81327a9ef1ac..2dcc33419dc7 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -7,6 +7,9 @@ using namespace std; using namespace swss; +/* select() function timeout retry time */ +#define SELECT_TIMEOUT 1000 + /* Global variable gPortsOrch declared */ PortsOrch *gPortsOrch; @@ -83,7 +86,7 @@ void OrchDaemon::start() Selectable *s; int fd, ret; - ret = m_select->select(&s, &fd, 1); + ret = m_select->select(&s, &fd, SELECT_TIMEOUT); if (ret == Select::ERROR) {