5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 11:50:28 +00:00

Merge pull request #317 from Arceliar/deadlock

Fix a deadlock
This commit is contained in:
Arceliar 2019-01-26 14:24:03 -06:00 committed by GitHub
commit 5b31cbee2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -625,5 +625,8 @@ func (sinfo *sessionInfo) doRecv(p *wire_trafficPacket) {
sinfo.updateNonce(&p.Nonce)
sinfo.time = time.Now()
sinfo.bytesRecvd += uint64(len(bs))
sinfo.core.router.toRecv <- router_recvPacket{bs, sinfo}
select {
case sinfo.core.router.toRecv <- router_recvPacket{bs, sinfo}:
default: // avoid deadlocks, maybe do this somewhere else?...
}
}