From: Jennifer Richards Date: Fri, 1 Jun 2018 19:39:56 +0000 (-0400) Subject: Set read timeout to 60 seconds instead of 60 ms (smh) X-Git-Tag: 3.4.0~1^2~7 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=4a2b122495ba45a536627c9b7af746150bfea1a5 Set read timeout to 60 seconds instead of 60 ms (smh) --- diff --git a/gsscon/gsscon_common.c b/gsscon/gsscon_common.c index 54cdd56..9d6ad3c 100755 --- a/gsscon/gsscon_common.c +++ b/gsscon/gsscon_common.c @@ -88,7 +88,7 @@ static void PrintBuffer (const char *inBuffer, /* --------------------------------------------------------------------------- */ /* Standard network read loop, accounting for EINTR, EOF and incomplete reads */ -#define READBUFFER_TIMEOUT 60 +#define READBUFFER_TIMEOUT_SECONDS (60 * 1000) static int ReadBuffer (int inSocket, size_t inBufferLength, char *ioBuffer) @@ -110,7 +110,7 @@ static int ReadBuffer (int inSocket, struct pollfd fds = {inSocket, POLLIN, 0}; /* poll for data ready on the socket */ int poll_rc = 0; - poll_rc = poll(&fds, 1, READBUFFER_TIMEOUT); + poll_rc = poll(&fds, 1, READBUFFER_TIMEOUT_SECONDS); if (poll_rc == 0) { /* timed out */ err = ETIMEDOUT;