fix: use ServicesSetter
This commit is contained in:
parent
fd55c0984f
commit
7cc5621a10
|
@ -446,7 +446,7 @@ func (p *P2PServiceDefault) OnNewPeerListen(peer net.Peer, verifyId bool) {
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
if mediator, ok := data.Mediator.(service.Service); ok {
|
if mediator, ok := data.Mediator.(service.ServicesSetter); ok {
|
||||||
mediator.SetServices(p.Services())
|
mediator.SetServices(p.Services())
|
||||||
} else {
|
} else {
|
||||||
p.Logger().Fatal("failed to cast mediator to service.Service")
|
p.Logger().Fatal("failed to cast mediator to service.Service")
|
||||||
|
|
Loading…
Reference in New Issue