From a65f0756a16f09d458df1dd6b83f947617182ec1 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Fri, 7 Jun 2019 14:20:43 +0200 Subject: [PATCH] http: fix test where aborted should not be emitted --- doc/api/http.md | 5 ++-- lib/_http_client.js | 16 +++++++++---- test/parallel/test-http-client-aborted.js | 23 +++++++++++++++++++ ...test-http-client-no-error-after-aborted.js | 21 +++++++++++++++++ .../test-http-client-timeout-on-connect.js | 3 +-- .../test-http-writable-true-after-close.js | 2 +- 6 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 test/parallel/test-http-client-aborted.js create mode 100644 test/parallel/test-http-client-no-error-after-aborted.js diff --git a/doc/api/http.md b/doc/api/http.md index 0588d7f408f194..f8453830f0c00d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -537,7 +537,8 @@ added: v0.3.8 --> Marks the request as aborting. Calling this will cause remaining data -in the response to be dropped and the socket to be destroyed. +in the response to be dropped and the socket to be destroyed. After +calling this method no further errors will be emitted. ### request.aborted