mirror of https://github.com/nodejs/node.git
dgram-uv: black hole incoming messages after closing
Fixes test/simple/test-dgram-pingpong.js on windowspull/5370/head
parent
01bf209a3d
commit
b5d58f11cb
|
@ -285,7 +285,11 @@ Socket.prototype._stopReceiving = function() {
|
|||
if (!this._receiving)
|
||||
return;
|
||||
|
||||
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._handle.recvStop();
|
||||
this._receiving = false;
|
||||
this.fd = null; // compatibility hack
|
||||
|
|
Loading…
Reference in New Issue