chore: upgrade go mod library

This commit is contained in:
fengcaiwen
2025-02-08 20:45:20 +08:00
parent a6730613e7
commit 2fc0bb3f0c
1704 changed files with 163038 additions and 69629 deletions

View File

@@ -107,7 +107,7 @@ func (s *server) processDelta(str stream.DeltaStream, reqCh <-chan *discovery.De
process := func(resp cache.DeltaResponse) error {
typ := resp.GetDeltaRequest().GetTypeUrl()
if resp == deltaErrorResponse {
return status.Errorf(codes.Unavailable, typ+" watch failed")
return status.Errorf(codes.Unavailable, "%s watch failed", typ)
}
nonce, err := send(resp)
@@ -230,23 +230,21 @@ func (s *server) DeltaStreamHandler(str stream.DeltaStream, typeURL string) erro
// we need to concurrently handle incoming requests since we kick off processDelta as a return
go func() {
defer close(reqCh)
for {
select {
case <-str.Context().Done():
close(reqCh)
req, err := str.Recv()
if err != nil {
return
}
select {
case reqCh <- req:
case <-str.Context().Done():
return
case <-s.ctx.Done():
return
default:
req, err := str.Recv()
if err != nil {
close(reqCh)
return
}
reqCh <- req
}
}
}()
return s.processDelta(str, reqCh, typeURL)
}