aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/server/sws.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 688fb9e12..b2d6df7a6 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -1440,6 +1440,14 @@ int main(int argc, char *argv[])
break;
logmsg("====> Client disconnect");
+
+ if(!req.open)
+ /* When instructed to close connection after server-reply we
+ wait a very small amount of time before doing so. If this
+ is not done client might get an ECONNRESET before reading
+ a single byte of server-reply. */
+ wait_ms(50);
+
sclose(msgsock);
msgsock = CURL_SOCKET_BAD;