diff --git a/lib/dgram.js b/lib/dgram.js index 6c70e175de2..483794b7256 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -209,10 +209,6 @@ Socket.prototype.send = function(buffer, function afterSend(status, handle, req, buffer) { var self = handle.owner; - // CHECKME socket's been closed by user, don't call callback? - if (handle !== self._handle) - void(0); - if (req.cb) req.cb(null, buffer.length); // compatibility with dgram_legacy.js } @@ -320,11 +316,6 @@ Socket.prototype._stopReceiving = function() { if (!this._receiving) return; - // Black hole messages coming in when reading is stopped. Libuv might do - // this, but node applications (e.g. test/simple/test-dgram-pingpong) may - // not expect it. - this._handle.onmessage = noop; - this._handle.recvStop(); this._receiving = false; this.fd = null; // compatibility hack