Skip to content

Commit

Permalink
Fixes two deprecation warnings
Browse files Browse the repository at this point in the history
`this._healthCheck()`& `this._handle` caused deprecation warnings.
  • Loading branch information
n-thumann committed Oct 16, 2019
1 parent 4807062 commit d265295
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ Socket.prototype.dropMembership = function(multicastAddress,
Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
groupAddress,
interfaceAddress) {
this._healthCheck();
healthCheck(this);

if (typeof sourceAddress !== 'string') {
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'sourceAddress',
Expand All @@ -847,7 +847,7 @@ Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
'string');
}

const err = this._handle.addSourceSpecificMembership(sourceAddress,
const err = this[kStateSymbol].handle.addSourceSpecificMembership(sourceAddress,
groupAddress,
interfaceAddress);
if (err) {
Expand All @@ -859,7 +859,7 @@ Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
Socket.prototype.dropSourceSpecificMembership = function(sourceAddress,
groupAddress,
interfaceAddress) {
this._healthCheck();
healthCheck(this);

if (typeof sourceAddress !== 'string') {
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'sourceAddress',
Expand All @@ -871,7 +871,7 @@ Socket.prototype.dropSourceSpecificMembership = function(sourceAddress,
'string');
}

const err = this._handle.dropSourceSpecificMembership(sourceAddress,
const err = this[kStateSymbol].handle.dropSourceSpecificMembership(sourceAddress,
groupAddress,
interfaceAddress);
if (err) {
Expand Down

0 comments on commit d265295

Please sign in to comment.