projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01bf209
)
dgram-uv: black hole incoming messages after closing
author
Bert Belder
<bertbelder@gmail.com>
Mon, 5 Sep 2011 01:30:12 +0000
(
03:30
+0200)
committer
Bert Belder
<bertbelder@gmail.com>
Mon, 5 Sep 2011 01:30:12 +0000
(
03:30
+0200)
Fixes test/simple/test-dgram-pingpong.js on windows
lib/dgram_uv.js
patch
|
blob
|
history
diff --git
a/lib/dgram_uv.js
b/lib/dgram_uv.js
index
117f871
..
4356447
100644
(file)
--- a/
lib/dgram_uv.js
+++ b/
lib/dgram_uv.js
@@
-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