Copilot commented on code in PR #1147:
URL: https://github.com/apache/dubbo-go-samples/pull/1147#discussion_r3955513971
##########
http3/go-server/cmd/main.go:
##########
@@ -50,7 +51,16 @@ func main() {
server.WithServerProtocol(
protocol.WithPort(20000),
protocol.WithTriple(
- triple.Http3Enable(),
+ triple.WithHttp3Enable(),
+ // QUIC transport tuning; unset options fall
back to quic-go defaults.
+ triple.WithHttp3KeepAlivePeriod(30*time.Second),
+ triple.WithHttp3MaxIdleTimeout(90*time.Second),
+ triple.WithHttp3MaxIncomingStreams(1024),
Review Comment:
The QUIC tuning values are currently embedded as magic numbers/durations in
the `WithHttp3*` option list, which makes it harder to understand units and
keep client/server values in sync; defining named constants improves
readability and makes future tweaking safer.
##########
http3/go-client/cmd/main.go:
##########
@@ -52,7 +52,16 @@ func main() {
// both HTTP/2 and HTTP/3 with Alt-Svc negotiation
client.WithClientProtocol(
protocol.WithTriple(
- triple.Http3Enable(),
+ triple.WithHttp3Enable(),
+ // QUIC transport tuning; unset options fall
back to quic-go defaults.
+ triple.WithHttp3KeepAlivePeriod(30*time.Second),
+ triple.WithHttp3MaxIdleTimeout(90*time.Second),
+ triple.WithHttp3MaxIncomingStreams(1024),
Review Comment:
The QUIC tuning values are embedded as literals inside the
`client.NewClient(...)` call, which makes it harder to see units and adjust
consistently; consider defining named constants once (in `main`) and using them
in the `WithHttp3*` calls.
##########
http3/go-server/cmd/main.go:
##########
@@ -19,6 +19,7 @@ package main
import (
"context"
+ "time"
)
Review Comment:
The file uses multiple separate `import` blocks, which makes it harder to
scan and deviates from typical Go formatting; consider consolidating into a
single grouped import block (stdlib vs third-party) so gofmt keeps imports
organized consistently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]