summaryrefslogtreecommitdiff
path: root/lib/_http_outgoing.js
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2017-07-20 18:02:54 +0200
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-07-20 16:17:06 -0400
commit69fdb47e207f9201f36593ba72440e122d193743 (patch)
tree78f252748071aa8ba366c08ac029f1c06531dacc /lib/_http_outgoing.js
parent107db33fb9afc0ecbc1207c0587f517b9beba8a3 (diff)
downloadandroid-node-v8-69fdb47e207f9201f36593ba72440e122d193743.tar.gz
android-node-v8-69fdb47e207f9201f36593ba72440e122d193743.tar.bz2
android-node-v8-69fdb47e207f9201f36593ba72440e122d193743.zip
http: do not abort if socket is missing
Fixes: https://github.com/nodejs/node/issues/14368 PR-URL: https://github.com/nodejs/node/pull/14387 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r--lib/_http_outgoing.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 8402bd2b61..1c570284ef 100644
--- a/lib/_http_outgoing.js
+++ b/lib/_http_outgoing.js
@@ -642,7 +642,7 @@ OutgoingMessage.prototype.write = function write(chunk, encoding, callback) {
function write_(msg, chunk, encoding, callback, fromEnd) {
if (msg.finished) {
var err = new Error('write after end');
- nextTick(msg.socket[async_id_symbol],
+ nextTick(msg.socket && msg.socket[async_id_symbol],
writeAfterEndNT.bind(msg),
err,
callback);