Skip to content
Browse files

dgram: defer send error to next tick

  • Loading branch information...
1 parent 0a912fd commit 1bcaa2abef3c37f5ce966deb8d90f0bf22c9bd29 @bnoordhuis committed Feb 23, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/dgram.js
View
5 lib/dgram.js
@@ -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);
+ });
}
}
});

0 comments on commit 1bcaa2a

Please sign in to comment.
Something went wrong with that request. Please try again.