From 84a4f54217e9ad34ca4a5beab8fb0c9b7b84c370 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Mon, 5 Aug 2019 18:49:15 -0500 Subject: [PATCH] temporary fix to nil pointer, better to make sure it's never nil --- src/yggdrasil/router.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/router.go b/src/yggdrasil/router.go index 2df7684f..161ae60a 100644 --- a/src/yggdrasil/router.go +++ b/src/yggdrasil/router.go @@ -161,7 +161,9 @@ func (r *router) handleTraffic(packet []byte) { return } 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 } select {