fix ticker
This commit is contained in:
parent
a5015692e3
commit
e22fa01935
@ -494,13 +494,12 @@ func (s *rpcServer) Start() error {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
t := new(time.Ticker)
|
||||||
// new ticker
|
|
||||||
t := time.NewTicker(s.opts.RegisterInterval)
|
|
||||||
|
|
||||||
// only process if it exists
|
// only process if it exists
|
||||||
if s.opts.RegisterInterval <= time.Duration(0) {
|
if s.opts.RegisterInterval > time.Duration(0) {
|
||||||
t.C = nil
|
// new ticker
|
||||||
|
t = time.NewTicker(s.opts.RegisterInterval)
|
||||||
}
|
}
|
||||||
|
|
||||||
// return error chan
|
// return error chan
|
||||||
|
Loading…
x
Reference in New Issue
Block a user