microsoft / microsoft/vscode-livepreview
Not correctly checking if websocket server is occupied before using it
@andreamah is already working on this.
Since Aug 21, 2022.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.