mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 19:21:44 +00:00
fix addrbook start/stop
This commit is contained in:
@ -135,6 +135,9 @@ func (a *AddrBook) OnStart() error {
|
|||||||
|
|
||||||
func (a *AddrBook) OnStop() {
|
func (a *AddrBook) OnStop() {
|
||||||
a.BaseService.OnStop()
|
a.BaseService.OnStop()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *AddrBook) Wait() {
|
||||||
a.wg.Wait()
|
a.wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,14 +42,14 @@ func NewPEXReactor(book *AddrBook) *PEXReactor {
|
|||||||
|
|
||||||
func (pexR *PEXReactor) OnStart() error {
|
func (pexR *PEXReactor) OnStart() error {
|
||||||
pexR.BaseReactor.OnStart()
|
pexR.BaseReactor.OnStart()
|
||||||
pexR.book.OnStart()
|
pexR.book.Start()
|
||||||
go pexR.ensurePeersRoutine()
|
go pexR.ensurePeersRoutine()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pexR *PEXReactor) OnStop() {
|
func (pexR *PEXReactor) OnStop() {
|
||||||
pexR.BaseReactor.OnStop()
|
pexR.BaseReactor.OnStop()
|
||||||
pexR.book.OnStop()
|
pexR.book.Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements Reactor
|
// Implements Reactor
|
||||||
|
Reference in New Issue
Block a user