Skip to content

Commit

Permalink
call postSend after sending
Browse files Browse the repository at this point in the history
  • Loading branch information
santigimeno committed Jul 26, 2016
1 parent 6a9a28f commit a3f5d50
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,16 @@ function setupChannel(target, channel) {
var err = channel.writeUtf8String(req, string, handle);

if (err === 0) {
if (handle && !this._handleQueue)
this._handleQueue = [];
if (handle) {
if (!this._handleQueue)
this._handleQueue = [];
if (obj && obj.postSend)
obj.postSend(handle, options, target);
}

req.oncomplete = function() {
if (this.async === true)
control.unref();
if (obj && obj.postSend)
obj.postSend(handle, options, target);
if (typeof callback === 'function')
callback(null);
};
Expand Down

0 comments on commit a3f5d50

Please sign in to comment.