mirror of
https://github.com/hackdiaz-dev/free-turn-proxy.git
synced 2026-10-12 09:41:53 +02:00
fix(bondserver): отмена при spin из-за потери lane
writeToNextLane теперь зовёт c.cancel() сразу, когда removeLane возвращает left==0, вместо ожидания таймаута через 10ms sleep-loop. Убирает spin, когда все lane пропали, а readLane уже отменил контекст.
This commit is contained in:
@@ -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