microsoft / microsoft/vscode-livepreview

Not correctly checking if websocket server is occupied before using it

Open
#262 0 comments 0 reactions 1 assignee View on GitHub

@andreamah is already working on this.

Since Aug 21, 2022.

bug polish
Dominant language
TypeScript
Stars
596
Forks
119
Avg merge
1d 4m
Merged PRs (30d)
5

Description

There is a check when the server is actually opened, which calls this. https://github.com/microsoft/vscode-livepreview/blob/d98f924b920543ef4de8df70c4581ab3d992333a/src/server/serverManager.ts#L408 It essentially tries to listen to a port and returns it if there's nothing on it. I do notice that it only gets called once and the ws server just takes the port after it, which may be wrong. I recall something about how the websocket server is able to be shared as long as the URL for it is different, but it seems that I don't check that.

https://github.com/microsoft/vscode-livepreview/pull/257#discussion_r950919553

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.