-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add default readtimeout and writetimeout #10701
Conversation
@codeboten hi , how can i Restart this process. |
4f0a5f7
to
e21f127
Compare
Signed-off-by: lenajiang <yufangjiang@harmonycloud.cn>
@J-lena it looks like the easy CLA check is all good now |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@codeboten hi,has any problems about this commit? |
@@ -48,6 +48,7 @@ $(TOOLS_BIN_NAMES): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod | |||
|
|||
.PHONY: test | |||
test: | |||
# $(GOTEST) $(GOTEST_OPT) -run TestSetDefaultConfig |
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.
Please revert this line?
} | ||
|
||
if cfg.HTTP.WriteTimeout == 0 { | ||
cfg.HTTP.WriteTimeout = defaultTimeout |
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.
at the very least this should be spelled out on the README.
This is not the right place to add this default value - it should be done in createDefaultConfig
instead:
func createDefaultConfig() component.Config { |
We can also change the way the default config is computed to use the confighttp.NewServerConfig and configgrpc.NewServerConfig instead of initializing structs by itself.
Please add a changelog. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description
Link to tracking issue
Fixes #10469
Testing
add a test function : TestSetDefaultConfig. beasecause the config_test has some failures, so i change makefile.common to only run mytest
Documentation