Skip to content

Commit

Permalink
Increase syncd get response timeout in sairedis (sonic-net#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed May 3, 2016
1 parent c00b6ed commit 3325b96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/sai_redis_generic_get.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "sai_redis.h"

// if we don't receive response from syncd in 60 seconds
// there is something wrong and we should fail
#define GET_RESPONSE_TIMEOUT (60*1000)

sai_status_t internal_redis_get_process(
_In_ sai_object_type_t object_type,
_In_ uint32_t attr_count,
Expand Down Expand Up @@ -92,7 +96,7 @@ sai_status_t internal_redis_generic_get(

int fd;

int result = s.select(&sel, &fd, 2000);
int result = s.select(&sel, &fd, GET_RESPONSE_TIMEOUT);

if (result == swss::Select::OBJECT)
{
Expand Down

0 comments on commit 3325b96

Please sign in to comment.