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

ci daily fix #2130

Closed
wants to merge 0 commits into from
Closed

ci daily fix #2130

wants to merge 0 commits into from

Conversation

daveads
Copy link

@daveads daveads commented Sep 30, 2024

Fix for #2087

/fix #2087
/calm #2087

Fix race condition in HTTP server handling

  • Implement safeServer to wrap http.Server
  • Modify SafeServe function to use safeServer
  • Update goServe method with new SafeServe implementation
  • Add synchronization to prevent concurrent resource access

Resolves race condition in xhttp.Serve(), fixing intermittent

New implementation provides better server lifecycle control and thread safety.

@daveads
Copy link
Author

daveads commented Sep 30, 2024

@daveads
Copy link
Author

daveads commented Sep 30, 2024

@alixander check it out..

Copy link
Collaborator

@alixander alixander 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 the PR.

I would like to continue to use https://github.com/terrastruct/util-go/blob/master/xhttp/serve.go . If the issue is part of that, can you submit a PR to that instead? It's just reusable library for Terrastruct's projects.

@daveads
Copy link
Author

daveads commented Sep 30, 2024

Thank you for the PR.

I would like to continue to use https://github.com/terrastruct/util-go/blob/master/xhttp/serve.go . If the issue is part of that, can you submit a PR to that instead? It's just reusable library for Terrastruct's projects.

hmm let me take a quick look at it.

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.

fix ci daily
2 participants