mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
test-memory: destroy response to free socket
Starting from Node 12, the test started to fail because of intermittent socket errors, such as ECONNRESET and "socket hang up". Destroying the response before triggering a new request resolves it.
This commit is contained in:
@@ -83,7 +83,8 @@ describe('memory usage', function() {
|
||||
cors_anywhere_child.send(null);
|
||||
return;
|
||||
}
|
||||
http.request(request, function() {
|
||||
http.request(request, function(res) {
|
||||
res.destroy();
|
||||
requestAgain();
|
||||
}).on('error', function(error) {
|
||||
done(error);
|
||||
|
||||
Reference in New Issue
Block a user