git.samba.org
/
socket_wrapper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tests/echo_srv: make the main server logic resilient to ECONNABORTED from accept()
[socket_wrapper.git]
/
tests
/
echo_srv.c
diff --git
a/tests/echo_srv.c
b/tests/echo_srv.c
index 87c85f74b22a96ca54878de502b98c3d5e123141..0aefa9aa9825f76c2e90535a52adc5eba90afc5a 100644
(file)
--- a/
tests/echo_srv.c
+++ b/
tests/echo_srv.c
@@
-538,6
+538,9
@@
static void echo_tcp(int sock)
while (1) {
s = accept(sock, &addr.sa.s, &addr.sa_socklen);
+ if (s == -1 && errno == ECONNABORTED) {
+ continue;
+ }
if (s == -1) {
perror("accept");
goto done;