mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 23:42:20 +08:00
move blocking calls out of single threaded loops, cancel contexts ASAP
This commit is contained in:
@ -228,6 +228,10 @@ func (e *Engine) MessageSent(p peer.ID, m bsmsg.BitSwapMessage) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *Engine) PeerDisconnected(p peer.ID) {
|
||||
// TODO: release ledger
|
||||
}
|
||||
|
||||
func (e *Engine) numBytesSentTo(p peer.ID) uint64 {
|
||||
// NB not threadsafe
|
||||
return e.findOrCreate(p).Accounting.BytesSent
|
||||
|
Reference in New Issue
Block a user