mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
have createSession fill the sessionInfo.cancel field, have Conn use Conn.session.cancel instead of storing its own cancellation, this should prevent any of these things from being both nil and reachable at the same time
This commit is contained in:
parent
8a85149817
commit
679866d5ff
4 changed files with 15 additions and 14 deletions
|
@ -161,8 +161,7 @@ func (r *router) handleTraffic(packet []byte) {
|
|||
return
|
||||
}
|
||||
sinfo, isIn := r.core.sessions.getSessionForHandle(&p.Handle)
|
||||
if !isIn || sinfo.cancel == nil {
|
||||
// FIXME make sure sinfo.cancel can never be nil
|
||||
if !isIn {
|
||||
util.PutBytes(p.Payload)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue