We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5867e6f commit 3ab462eCopy full SHA for 3ab462e
src/UDPClusterManager.ts
@@ -370,7 +370,8 @@ export class UDPClusterManager extends ClusterManager {
370
socket.close(() => {
371
// unref may be missing or not a function on mocked sockets
372
if (socket && typeof (socket as any).unref === 'function') {
373
- (socket as any).unref();
+ if (socket && hasUnref(socket)) {
374
+ socket.unref();
375
}
376
377
if (
0 commit comments