Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lib/web/websocket/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const { SendQueue } = require('./sender')
const { WebsocketFrameSend } = require('./frame')
const { channels } = require('../../core/diagnostics')

const kRef = Symbol.for('nodejs.ref')
const kUnref = Symbol.for('nodejs.unref')

let ping

function getSocketAddress (socket) {
Expand Down Expand Up @@ -73,7 +70,6 @@ class WebSocket extends EventTarget {
#bufferedAmount = 0
#protocol = ''
#extensions = ''
#refed = true

/** @type {SendQueue} */
#sendQueue
Expand Down Expand Up @@ -200,18 +196,6 @@ class WebSocket extends EventTarget {
this.#binaryType = 'blob'
}

// TODO: remove this
[kRef] () {
this.#refed = true
this.#handler.socket?.ref?.()
}

// TODO: remove this
[kUnref] () {
this.#refed = false
this.#handler.socket?.unref?.()
}

/**
* @see https://websockets.spec.whatwg.org/#dom-websocket-close
* @param {number|undefined} code
Expand Down Expand Up @@ -486,10 +470,6 @@ class WebSocket extends EventTarget {
// once this happens, the connection is open
this.#handler.socket = response.socket

if (!this.#refed) {
this.#handler.socket.unref?.()
}

// Get options from dispatcher options
const maxFragments = this.#handler.controller.dispatcher?.webSocketOptions?.maxFragments
const maxPayloadSize = this.#handler.controller.dispatcher?.webSocketOptions?.maxPayloadSize
Expand Down
60 changes: 0 additions & 60 deletions test/websocket/process-ref.js

This file was deleted.

Loading