From 4b56849b082e944edce0ca49ca217a656717749b Mon Sep 17 00:00:00 2001 From: Arceliar Date: Mon, 10 Jun 2019 22:09:12 -0500 Subject: [PATCH] fix issue with sessions dying and never being fixed --- src/yggdrasil/conn.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yggdrasil/conn.go b/src/yggdrasil/conn.go index 3df7c79..9ce5563 100644 --- a/src/yggdrasil/conn.go +++ b/src/yggdrasil/conn.go @@ -274,6 +274,10 @@ func (c *Conn) Write(b []byte) (bytesWritten int, err error) { c.writebuf = c.writebuf[1:] } return len(b), nil + } else { + // This triggers some session keepalive traffic + // FIXME this desparately needs to be refactored, since the ping case needlessly goes through the router goroutine just to have it pass a function to the session worker when it determines that a session already exists. + c.core.router.doAdmin(c.startSearch) } var packet []byte done := make(chan struct{})