dgram: defer send error to next tick

pull/24503/head
Ben Noordhuis 2012-02-23 01:52:45 +01:00
parent defa637378
commit 3502e45b6c
1 changed files with 4 additions and 1 deletions

View File

@ -189,7 +189,10 @@ Socket.prototype.send = function(buffer,
}
else {
// don't emit as error, dgram_legacy.js compatibility
callback(errnoException(errno, 'send'));
var err = errnoException(errno, 'send');
process.nextTick(function() {
callback(err);
});
}
}
});