Skip to content

Fix ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException on NodeJS #63681

@maraf

Description

@maraf

Running test on NodeJS causes uncaught exception

  Error: Server sent a subprotocol but none was requested
      at ClientRequest.<anonymous> (C:\Development\dotnet\runtime\artifacts\bin\System.Net.WebSockets.Client.Tests\net7.0-Browser-Debug\browser-wasm\AppBundle\node_modules\ws\lib\websocket.js:855:7)
      at ClientRequest.emit (node:events:390:28)
      at Socket.socketOnData (node:_http_client:527:11)
      at Socket.emit (node:events:390:28)
      at addChunk (node:internal/streams/readable:324:12)
      at readableAddChunk (node:internal/streams/readable:297:9)
      at Socket.Readable.push (node:internal/streams/readable:234:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
      
  Emitted 'error' event on WebSocket instance at:
      at Object.onceWrapper (node:events:510:26)
      at Socket.emit (node:events:390:28)
      at emitErrorNT (node:internal/streams/destroy:164:8)
      at emitErrorCloseNT (node:internal/streams/destroy:129:3)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions