mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-03 09:37:47 +00: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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user