diff --git a/main.go b/main.go index 65883a7..8b66b0a 100644 --- a/main.go +++ b/main.go @@ -138,6 +138,13 @@ func StartNode(cfg *ConfigServer) { // 设置共享的参数 DequeueHandler.WithShared(nh) + go func() { + for DequeueHandler != nil { + DequeueHandler.Notify(DequeueHandler.NULL) + time.Sleep(time.Second * 5) + } + }() + if err := nh.StartReplica(initialMembers, false, NewSMQueue, rc); err != nil { fmt.Fprintf(os.Stderr, "failed to add cluster, %v\n", err) os.Exit(1)