fix(bondserver): отмена при spin из-за потери lane
writeToNextLane теперь зовёт c.cancel() сразу, когда removeLane возвращает left==0, вместо ожидания таймаута через 10ms sleep-loop. Убирает spin, когда все lane пропали, а readLane уже отменил контекст.
This commit is contained in:
1 parent
9090d5894a
commit
f54f59bff9
1 file changed
+1
@@ -336,6 +336,7 @@ func (c *serverConn) writeToNextLane(typ byte, seq uint64, data []byte, laneIdx
|
||||
left := c.removeLane(lane)
|
||||
c.deps.log().Errorf("[bond %d] lane %d write error: %v (lanes=%d)", c.id, lane.index, err, left)
|
||||
if left == 0 {
|
||||
c.cancel()
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user