caching grpc clients

This commit is contained in:
Chris Lu
2018-11-14 23:50:46 -08:00
parent d89774cb7f
commit d3b7965c76
2 changed files with 34 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ func (wfs *WFS) withFilerClient(fn func(filer_pb.SeaweedFilerClient) error) erro
grpcConnection, err := util.GrpcDial(wfs.option.FilerGrpcAddress)
if err != nil {
wfs.grpcClientsLock.Unlock()
return fmt.Errorf("fail to dial %s: %v", wfs.option.FilerGrpcAddress, err)
}