code: function receiverOnError(err) {
    const websocket = this[kWebSocket];
  
    websocket._socket.removeListener('data', socketOnData);
  
    websocket.readyState = WebSocket.CLOSING;
    websocket._closeCode = err[kStatusCode];
    websocket.emit('error', err);
    websocket._socket.destroy();
  }
docs: The listener of the `Receiver` `'error'` event.
  
  @param {(RangeError|Error)} err The emitted error
  @private