fix: temp cast mediator so we can set the service data
This commit is contained in:
parent
9919ad72da
commit
5a2e28faba
|
@ -446,6 +446,12 @@ func (p *P2PServiceDefault) OnNewPeerListen(peer net.Peer, verifyId bool) {
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mediator, ok := data.Mediator.(service.Service); ok {
|
||||||
|
mediator.SetServices(p.Services())
|
||||||
|
} else {
|
||||||
|
p.Logger().Fatal("failed to cast mediator to service.Service")
|
||||||
|
}
|
||||||
|
|
||||||
dec := msgpack.NewDecoder(bytes.NewReader(reader.Data))
|
dec := msgpack.NewDecoder(bytes.NewReader(reader.Data))
|
||||||
|
|
||||||
err = handler.DecodeMessage(dec, data)
|
err = handler.DecodeMessage(dec, data)
|
||||||
|
|
Loading…
Reference in New Issue