4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-01 03:56:17 +00:00
This commit is contained in:
Neil Alexander
2018-05-27 22:13:37 +01:00
parent 707e23d392
commit 4c115de633
9 changed files with 363 additions and 108 deletions

View File

@ -167,6 +167,9 @@ func (t *switchTable) init(core *Core, key sigPubKey) {
t.updater.Store(&sync.Once{})
t.table.Store(lookupTable{})
t.drop = make(map[sigPubKey]int64)
}
func (t *switchTable) start() error {
doTicker := func() {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
@ -176,6 +179,7 @@ func (t *switchTable) init(core *Core, key sigPubKey) {
}
}
go doTicker()
return nil
}
func (t *switchTable) getLocator() switchLocator {