Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if editor session manager socket cannot be created. #6277

Closed
wants to merge 1 commit into from

Conversation

sleexyz
Copy link
Contributor

@sleexyz sleexyz commented Jun 20, 2023

Fixes #6275

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #6277 (8b27c26) into main (fdeaba9) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6277      +/-   ##
==========================================
+ Coverage   73.56%   73.60%   +0.04%     
==========================================
  Files          31       31              
  Lines        1861     1864       +3     
  Branches      399      399              
==========================================
+ Hits         1369     1372       +3     
  Misses        415      415              
  Partials       77       77              
Impacted Files Coverage Δ
src/node/main.ts 51.04% <100.00%> (+0.51%) ⬆️
src/node/vscodeSocket.ts 87.61% <100.00%> (+0.24%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d3c9ed...8b27c26. Read the comment docs.

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for responding so quickly!

One wrinkle is that the logs would say Session server listening on undefined. One idea is to return undefined if there is an error and in main.ts branch based on that.

if (server) {
  logger.info("Server listening etc")
} else {
  logger.error("failed etc etc")
}

Or we could have a server.isListening property or something like that. Wait we could just branch on the address itself since that would be undefined.

@sleexyz
Copy link
Contributor Author

sleexyz commented Jun 21, 2023

Wait we could just branch on the address itself since that would be undefined.

Done!

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, love the test too!

@code-asher code-asher enabled auto-merge (squash) June 21, 2023 01:33
@code-asher
Copy link
Member

It looks like the other PR also included these changes so I decided to tweak the commit message on the other and merge in just that one. Thanks again!

@code-asher code-asher closed this Jun 21, 2023
auto-merge was automatically disabled June 21, 2023 18:40

Pull request was closed

@sleexyz sleexyz deleted the open-fix branch June 21, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Can't start 2 instances of code-server 4.14.0 for separate users
2 participants