From ec08a1670b6db6a1ad1300728f06493d8066da9b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 7 Oct 2020 23:48:24 -0700 Subject: [PATCH] volume: avoid hanging when stopping a volume server --- weed/server/volume_grpc_client_to_master.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.go index 8698a4c64..199f8faba 100644 --- a/weed/server/volume_grpc_client_to_master.go +++ b/weed/server/volume_grpc_client_to_master.go @@ -90,7 +90,7 @@ func (vs *VolumeServer) StopHeartbeat() (isAlreadyStopping bool) { return true } vs.isHeartbeating = false - vs.stopChan <- true + close(vs.stopChan) return false }