mark4z commented on a change in pull request #1293: URL: https://github.com/apache/dubbo-go/pull/1293#discussion_r663436520
########## File path: protocol/grpc/server.go ########## @@ -115,7 +115,8 @@ func waitGrpcExporter(providerServices map[string]*config.ServiceConfig) { t := time.NewTicker(50 * time.Millisecond) defer t.Stop() pLen := len(providerServices) - ta := time.After(10 * time.Second) + ta := time.NewTimer(10 * time.Second) + defer ta.Stop() Review comment: It is indeed necessary to call B once when the timeout use defer, but it is too complicated to set the flag in each branch. defer is obviously a bit more concise. -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org