-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
An atomic approach for HostClient.MaxConns #531
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some documentation that MaxConns
can be changed using atomic.StoreUint64
.
4744d70
to
53c3eb0
Compare
Thanks. |
Thank you! |
Sounds reasonable to me. I doubt that somebody can reach limit of 4M connections. @erikdubbelboer |
@xuecai yes for atomic operations it should definitely be a |
@xaionaro I'm sorry I made a mistake merging this pull request (looks like I wasn't thinking). One problem was that we can't just change |
@erikdubbelboer I see. It's quite bad for us. How can we safely change the MaxConns then? |
@xaionaro that's why I introduced the |
Ah. Did not notice. OK. Thanks. Sorry if I caused any problems :( |
We need to dynamically change a
MaxConns
value. So this patch is about safe atomic reading fromMaxConns
.