Skip to content

Commit d265295

Browse files
authored
Fixes two deprecation warnings
`this._healthCheck()`& `this._handle` caused deprecation warnings.
1 parent 4807062 commit d265295

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/dgram.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ Socket.prototype.dropMembership = function(multicastAddress,
835835
Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
836836
groupAddress,
837837
interfaceAddress) {
838-
this._healthCheck();
838+
healthCheck(this);
839839

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

850-
const err = this._handle.addSourceSpecificMembership(sourceAddress,
850+
const err = this[kStateSymbol].handle.addSourceSpecificMembership(sourceAddress,
851851
groupAddress,
852852
interfaceAddress);
853853
if (err) {
@@ -859,7 +859,7 @@ Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
859859
Socket.prototype.dropSourceSpecificMembership = function(sourceAddress,
860860
groupAddress,
861861
interfaceAddress) {
862-
this._healthCheck();
862+
healthCheck(this);
863863

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

874-
const err = this._handle.dropSourceSpecificMembership(sourceAddress,
874+
const err = this[kStateSymbol].handle.dropSourceSpecificMembership(sourceAddress,
875875
groupAddress,
876876
interfaceAddress);
877877
if (err) {

0 commit comments

Comments
 (0)