5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-29 23:41:35 +00:00

temporary fix to nil pointer, better to make sure it's never nil

This commit is contained in:
Arceliar 2019-08-05 18:49:15 -05:00
parent bd3b42022b
commit 84a4f54217

View File

@ -161,7 +161,9 @@ func (r *router) handleTraffic(packet []byte) {
return return
} }
sinfo, isIn := r.core.sessions.getSessionForHandle(&p.Handle) sinfo, isIn := r.core.sessions.getSessionForHandle(&p.Handle)
if !isIn { if !isIn || sinfo.cancel == nil {
// FIXME make sure sinfo.cancel can never be nil
util.PutBytes(p.Payload)
return return
} }
select { select {