protocol

protocol tests
Log | Files | Refs | Submodules | README | git clone https://git.ne02ptzero.me/git/protocol

commit c8c52ea7dce54b33bdf2607573cfe53af980f9b2
parent b5c9adc2b1eec6f87a97684507d48ff02e508ab5
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue,  2 May 2017 11:34:45 +0200

Fix(Client): Fix Macro READ_TIMEOUT in case the server do not respond

Diffstat:
Minc/client_test.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inc/client_test.h b/inc/client_test.h @@ -21,7 +21,8 @@ timeout.tv_usec = 0; \ rv = select(sockfd + 1, &set, NULL, NULL, &timeout); \ TEST_ASSERT(rv > 0, "Timeout on read"); \ - r_n = read(sockfd, ret, size); + r_n = read(sockfd, ret, size); \ + if (r_n == 0) { close(sockfd); sockfd = 0; } void begin_client_test(void);