diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-30 16:58:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-30 16:58:09 -0800 |
commit | b95f5b70b0e964ba27679a4aeaf9b5764dca07aa (patch) | |
tree | 140c2e6ce1233cab46acda4fb73b7ca4f77b931d /tests | |
parent | 3370e11ac457261f0d0986cafe7f6a07a4defb25 (diff) | |
parent | 001806e94750f1f413d7d58aa63cf98f2482c008 (diff) |
Merge pull request #807 from caiiiycuk/websocket__1
Fix '-1' problem in recv
Diffstat (limited to 'tests')
-rw-r--r-- | tests/websockets.c | 2 | ||||
-rw-r--r-- | tests/websockets_bi.c | 2 | ||||
-rw-r--r-- | tests/websockets_bi_bigdata.c | 2 | ||||
-rw-r--r-- | tests/websockets_bi_listener.c | 2 | ||||
-rw-r--r-- | tests/websockets_gethostbyname.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/tests/websockets.c b/tests/websockets.c index 57549e94..59acbd69 100644 --- a/tests/websockets.c +++ b/tests/websockets.c @@ -50,7 +50,7 @@ unsigned int get_all_buf(int sock, char* output, unsigned int maxsize) } } - if(n < 0) { + if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { fprintf(stderr, "error in get_all_buf!"); exit(EXIT_FAILURE); } diff --git a/tests/websockets_bi.c b/tests/websockets_bi.c index c2dbb7da..18cdd664 100644 --- a/tests/websockets_bi.c +++ b/tests/websockets_bi.c @@ -35,7 +35,7 @@ unsigned int get_all_buf(int sock, char* output, unsigned int maxsize) } } - if(n < 0) { + if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { fprintf(stderr, "error in get_all_buf!"); exit(EXIT_FAILURE); } diff --git a/tests/websockets_bi_bigdata.c b/tests/websockets_bi_bigdata.c index 5db2c951..2039f83c 100644 --- a/tests/websockets_bi_bigdata.c +++ b/tests/websockets_bi_bigdata.c @@ -37,7 +37,7 @@ unsigned int get_all_buf(int sock, char* output, unsigned int maxsize) } } - if(n < 0) { + if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { fprintf(stderr, "error in get_all_buf!"); exit(EXIT_FAILURE); } diff --git a/tests/websockets_bi_listener.c b/tests/websockets_bi_listener.c index 587fbed2..6c3b17b1 100644 --- a/tests/websockets_bi_listener.c +++ b/tests/websockets_bi_listener.c @@ -35,7 +35,7 @@ unsigned int get_all_buf(int sock, char* output, unsigned int maxsize) } } - if(n < 0) { + if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { fprintf(stderr, "error in get_all_buf!"); exit(EXIT_FAILURE); } diff --git a/tests/websockets_gethostbyname.c b/tests/websockets_gethostbyname.c index 6b8777f1..cba2c635 100644 --- a/tests/websockets_gethostbyname.c +++ b/tests/websockets_gethostbyname.c @@ -35,7 +35,7 @@ unsigned int get_all_buf(int sock, char* output, unsigned int maxsize) } } - if(n < 0) { + if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { fprintf(stderr, "error in get_all_buf!"); exit(EXIT_FAILURE); } |