diff --git a/src/yggdrasil/session.go b/src/yggdrasil/session.go index 6b7f62d2..cdabaf2b 100644 --- a/src/yggdrasil/session.go +++ b/src/yggdrasil/session.go @@ -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?... + } }