Skip to content

Commit a3f5d50

Browse files
committed
call postSend after sending
1 parent 6a9a28f commit a3f5d50

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/internal/child_process.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,16 @@ function setupChannel(target, channel) {
627627
var err = channel.writeUtf8String(req, string, handle);
628628

629629
if (err === 0) {
630-
if (handle && !this._handleQueue)
631-
this._handleQueue = [];
630+
if (handle) {
631+
if (!this._handleQueue)
632+
this._handleQueue = [];
633+
if (obj && obj.postSend)
634+
obj.postSend(handle, options, target);
635+
}
636+
632637
req.oncomplete = function() {
633638
if (this.async === true)
634639
control.unref();
635-
if (obj && obj.postSend)
636-
obj.postSend(handle, options, target);
637640
if (typeof callback === 'function')
638641
callback(null);
639642
};

0 commit comments

Comments
 (0)