shim in new receive to the reactor interface

This commit is contained in:
William Banfield
2022-10-19 20:51:42 -04:00
parent e20d28429d
commit 7b41c03409
2 changed files with 6 additions and 0 deletions

View File

@@ -45,6 +45,8 @@ type Reactor interface {
//
// CONTRACT: msgBytes are not nil.
Receive(chID byte, peer Peer, msgBytes []byte)
NewReceive(Envelope)
}
//--------------------------------------

View File

@@ -414,6 +414,10 @@ func createMConnection(
}
p.metrics.PeerReceiveBytesTotal.With(labels...).Add(float64(len(msgBytes)))
reactor.Receive(chID, p, msgBytes)
reactor.NewReceive(Envelope{
ChannelID: chID,
Src: p,
})
}
onError := func(r interface{}) {