diff --git a/server/grpc_bytestream.go b/server/grpc_bytestream.go index e320d6d57..4f43d6e9a 100644 --- a/server/grpc_bytestream.go +++ b/server/grpc_bytestream.go @@ -234,8 +234,8 @@ func (s *grpcServer) Write(srv bytestream.ByteStream_WriteServer) error { var resp bytestream.WriteResponse pr, pw := io.Pipe() - putResult := make(chan error) - recvResult := make(chan error) + putResult := make(chan error, 1) + recvResult := make(chan error, 1) resourceNameChan := make(chan string, 1) go func() { @@ -297,7 +297,8 @@ func (s *grpcServer) Write(srv bytestream.ByteStream_WriteServer) error { } go func() { - putResult <- s.cache.Put(cache.CAS, hash, size, pr) + err := s.cache.Put(cache.CAS, hash, size, pr) + putResult <- err }() firstIteration = false