diff --git a/server/grpc_bytestream.go b/server/grpc_bytestream.go index d8303d132..89b3ae76b 100644 --- a/server/grpc_bytestream.go +++ b/server/grpc_bytestream.go @@ -447,6 +447,7 @@ func (s *grpcServer) Write(srv bytestream.ByteStream_WriteServer) error { go func() { err := s.cache.Put(cache.CAS, hash, size, rc) + _, _ = io.Copy(io.Discard, rc) // Ensure that the writing goroutine is unblocked. putResult <- err }() @@ -460,7 +461,7 @@ func (s *grpcServer) Write(srv bytestream.ByteStream_WriteServer) error { } } - n, err := pw.Write(req.Data) + n, err := pw.Write(req.Data) // This blocks until all the data written here is read from pr. if err != nil { recvResult <- status.Error(codes.Internal, err.Error()) return