diff --git a/lib/dgram.js b/lib/dgram.js index f30e562c35f896..2b65b94bce551a 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -332,10 +332,7 @@ function afterSend(err) { if (err) { err = exceptionWithHostPort(err, 'send', this.address, this.port); } - var self = this; - setImmediate(function() { - self.callback(err, self.length); - }); + this.callback(err, this.length); }