summaryrefslogtreecommitdiff
path: root/lib/dgram.js
diff options
context:
space:
mode:
authorOuyang Yadong <oyydoibh@gmail.com>2018-08-10 10:51:24 +0800
committerJon Moss <me@jonathanmoss.me>2018-08-10 15:26:56 -0400
commit3ce6bc3b5082478dfe6832997640c93de97705be (patch)
tree6bc1002c18b1b0ce6384c708f74468761fa17aa4 /lib/dgram.js
parent7b1f3a4133cf7481b36a1ae24cd4650730b4bab4 (diff)
downloadandroid-node-v8-3ce6bc3b5082478dfe6832997640c93de97705be.tar.gz
android-node-v8-3ce6bc3b5082478dfe6832997640c93de97705be.tar.bz2
android-node-v8-3ce6bc3b5082478dfe6832997640c93de97705be.zip
dgram: remove unnecessary fd property from Socket
It seems the property socket.fd is used long before for the compatibility reason but it's not used anymore. It's also not documented in docs so that it's not a public api/property. Keep the property also make the code a bit confusing as socket._handle.fd is the actual property representing fd. PR-URL: https://github.com/nodejs/node/pull/21684 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'lib/dgram.js')
-rw-r--r--lib/dgram.js3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/dgram.js b/lib/dgram.js
index 44a7f09d00..af1e23f512 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -85,7 +85,6 @@ function Socket(type, listener) {
this[async_id_symbol] = handle.getAsyncId();
this.type = type;
- this.fd = null; // compatibility hack
if (typeof listener === 'function')
this.on('message', listener);
@@ -116,7 +115,6 @@ function startListening(socket) {
state.handle.recvStart();
state.receiving = true;
state.bindState = BIND_STATE_BOUND;
- socket.fd = -42; // compatibility hack
if (state.recvBufferSize)
bufferSize(socket, state.recvBufferSize, RECV_BUFFER);
@@ -677,7 +675,6 @@ function stopReceiving(socket) {
state.handle.recvStop();
state.receiving = false;
- socket.fd = null; // compatibility hack
}