use streaming mode for long poll grpc calls
streaming mode would create separate grpc connections for each call. this is to ensure the long poll connections are properly closed.
This commit is contained in:
@@ -97,9 +97,9 @@ func (ce *CommandEnv) checkDirectory(path string) error {
|
||||
|
||||
var _ = filer_pb.FilerClient(&CommandEnv{})
|
||||
|
||||
func (ce *CommandEnv) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
func (ce *CommandEnv) WithFilerClient(streamingMode bool, fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
return pb.WithGrpcFilerClient(ce.option.FilerAddress, ce.option.GrpcDialOption, fn)
|
||||
return pb.WithGrpcFilerClient(streamingMode, ce.option.FilerAddress, ce.option.GrpcDialOption, fn)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user