diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-01-26 14:42:11 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-01-26 14:42:11 -0800 |
| commit | 72a64a5cf8c2a5adfe59665a746e013ca948e681 (patch) | |
| tree | a0fd30cd09d5f6f5a4f8031818f1b12bf7b85f4f /weed/operation/tail_volume.go | |
| parent | 0c298ef8906816b40b19db36be673af564af032a (diff) | |
| download | seaweedfs-72a64a5cf8c2a5adfe59665a746e013ca948e681.tar.xz seaweedfs-72a64a5cf8c2a5adfe59665a746e013ca948e681.zip | |
use the same context object in order to retry
Diffstat (limited to 'weed/operation/tail_volume.go')
| -rw-r--r-- | weed/operation/tail_volume.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/operation/tail_volume.go b/weed/operation/tail_volume.go index b53f18ce1..1e8b0a16e 100644 --- a/weed/operation/tail_volume.go +++ b/weed/operation/tail_volume.go @@ -26,9 +26,9 @@ func TailVolume(master string, grpcDialOption grpc.DialOption, vid needle.Volume } func TailVolumeFromSource(volumeServer string, grpcDialOption grpc.DialOption, vid needle.VolumeId, sinceNs uint64, idleTimeoutSeconds int, fn func(n *needle.Needle) error) error { - return WithVolumeServerClient(volumeServer, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error { + return WithVolumeServerClient(volumeServer, grpcDialOption, func(ctx context.Context, client volume_server_pb.VolumeServerClient) error { - stream, err := client.VolumeTailSender(context.Background(), &volume_server_pb.VolumeTailSenderRequest{ + stream, err := client.VolumeTailSender(ctx, &volume_server_pb.VolumeTailSenderRequest{ VolumeId: uint32(vid), SinceNs: sinceNs, IdleTimeoutSeconds: uint32(idleTimeoutSeconds), |
