From 4a2b122495ba45a536627c9b7af746150bfea1a5 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 1 Jun 2018 15:39:56 -0400 Subject: [PATCH] Set read timeout to 60 seconds instead of 60 ms (smh) --- gsscon/gsscon_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.1.4