Don't panic if changing interest fills the write buffer

This was the old behaviour, years ago. I don't know why it's suddenly being triggered lately.
This commit is contained in:
Matt Joiner 2023-05-19 14:09:27 +10:00
parent c3622dea3d
commit 8ac9ea890e
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ func (p *Peer) maybeUpdateActualRequestState() {
func (p *Peer) applyRequestState(next desiredRequestState) {
current := &p.requestState
if !p.setInterested(next.Interested) {
panic("insufficient write buffer")
return
}
more := true
requestHeap := binheap.FromSlice(next.Requests.requestIndexes, next.Requests.lessByValue)