summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/network/test1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/network/test1.c b/tests/network/test1.c
index 969c405..2b29445 100644
--- a/tests/network/test1.c
+++ b/tests/network/test1.c
@@ -194,6 +194,9 @@ SECOND_CONNECT_AGAIN:
if( errno == EINTR ) {
/* interrupted, no problem, the connection goes on anyway */
goto SECOND_CONNECT_AGAIN;
+ } else if( errno == EISCONN ) {
+ /* already connected, first connect succeeded */
+ goto CONNECTED;
} else {
(void)close( fd );
fprintf( stderr, "second connect failed: %s (%d)\n", strerror( errno ), errno );