Skip to content

fix(ws): mount multi ws servers on different paths - #11188

Merged
kamilmysliwiec merged 2 commits into
nestjs:masterfrom
CodyTseng:fix-ws-multi-servers-on-different-paths
Apr 5, 2023
Merged

kamilmysliwiec merged 2 commits into
nestjs:masterfrom
CodyTseng:fix-ws-multi-servers-on-different-paths

Conversation

@CodyTseng

@CodyTseng CodyTseng commented Mar 4, 2023 •

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

The path parameter does not work as expected. Because the path and noServer parameters can only be provided one. https://github.com/websockets/ws/blob/HEAD/doc/ws.md#new-websocketserveroptions-callback

const wsServer = this.bindErrorHandler(
new wsPackage.Server({
noServer: true,
...wsOptions,
}),
);

The wsOptions contain the path parameter.

What is the new behavior?

Multiple ws servers can be successfully mounted on different paths as described in the documentation.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls

coveralls commented Mar 4, 2023 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 3dcfc662-2d8e-4349-bfd2-7f9a026746ee

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.667%

Totals Coverage Status
Change from base Build f8fbebfc-ae32-4a4b-ab20-2be9b8108b43: 0.0%
Covered Lines: 6508
Relevant Lines: 7023

💛 - Coveralls

@kamilmysliwiec
kamilmysliwiec merged commit c885a89 into nestjs:master Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants