1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-08 01:24:57 +08:00

fix(link): early use of new listen buf

This commit is contained in:
源文雨
2024-08-11 22:23:43 +08:00
parent 9942ef2bd0
commit dfc9f1a7c4

View File

@@ -86,10 +86,9 @@ func (m *Me) listen() (conn p2p.Conn, err error) {
q := make(listenqueue, n)
defer close(q)
go q.listen(m, hasntfinished)
i := uint(0)
for {
usenewbuf := false
i %= n
i := uint(0)
for !hasntfinished[i].TryLock() {
i++
i %= n