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

后端资源超时时间允许最小20ms #489

Merged
merged 2 commits into from
Sep 3, 2024
Merged

后端资源超时时间允许最小20ms #489

merged 2 commits into from
Sep 3, 2024

Conversation

parabala
Copy link
Collaborator

特殊业务需要较小的超时时间,目前配置里的超时时间也是20ms

@@ -39,7 +39,7 @@ impl Timeout {
me
}
pub fn adjust(&mut self, ms: u32) {
self.ms = ms.max(100).min(6000) as u16;
self.ms = ms.max(20).min(6000) as u16;
Copy link
Member

Choose a reason for hiding this comment

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

20、6000 提出来成常量,类似 MIN_TIMEOUT_MILLS,MAX_TIMEOUT_MILLS ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已用常量代替

Copy link
Member

@hustfisher hustfisher left a comment

Choose a reason for hiding this comment

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

LGFM!

@parabala parabala merged commit be75274 into main Sep 3, 2024
1 check passed
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.

2 participants