mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
avoid ticker leak
This commit is contained in:
parent
ba98f02d02
commit
364bb6c7b4
@ -66,6 +66,7 @@ func main() {
|
||||
|
||||
go func() {
|
||||
ticker := time.NewTicker(1000 * time.Millisecond)
|
||||
defer ticker.Stop()
|
||||
|
||||
var lastTime time.Time
|
||||
var counter, size int64
|
||||
|
@ -72,6 +72,7 @@ func main() {
|
||||
|
||||
go func() {
|
||||
ticker := time.NewTicker(500 * time.Millisecond)
|
||||
defer ticker.Stop()
|
||||
|
||||
var lastTime time.Time
|
||||
var counter, size int64
|
||||
|
@ -297,6 +297,7 @@ func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServ
|
||||
}()
|
||||
|
||||
ticker := time.NewTicker(5 * time.Second)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case message := <-messageChan:
|
||||
|
@ -159,7 +159,9 @@ func (vs *VolumeServer) doHeartbeat(masterAddress pb.ServerAddress, grpcDialOpti
|
||||
}
|
||||
|
||||
volumeTickChan := time.NewTicker(sleepInterval)
|
||||
defer volumeTickChan.Stop()
|
||||
ecShardTickChan := time.NewTicker(17 * sleepInterval)
|
||||
defer ecShardTickChan.Stop()
|
||||
dataCenter := vs.store.GetDataCenter()
|
||||
rack := vs.store.GetRack()
|
||||
ip := vs.store.Ip
|
||||
|
Loading…
Reference in New Issue
Block a user