Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

dgram-uv: black hole incoming messages after closing

Fixes test/simple/test-dgram-pingpong.js on windows
  • Loading branch information...
piscisaureus committed Sep 5, 2011
1 parent 01bf209 commit b5d58f11cb9e5a56a590631a8b87a5b99e942365
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/dgram_uv.js
@@ -285,7 +285,11 @@ Socket.prototype._stopReceiving = function() {
if (!this._receiving)

this._handle.onmessage = null;
// 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._receiving = false;
this.fd = null; // compatibility hack

0 comments on commit b5d58f1

Please sign in to comment.
You can’t perform that action at this time.