5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 08:40:28 +00:00

Merge pull request #429 from Arceliar/sessionfix

fix issue with sessions dying and never being fixed
This commit is contained in:
Neil Alexander 2019-06-11 10:07:52 +01:00 committed by GitHub
commit d4a3b2bc76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,10 @@ func (c *Conn) Write(b []byte) (bytesWritten int, err error) {
c.writebuf = c.writebuf[1:] c.writebuf = c.writebuf[1:]
} }
return len(b), nil 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 var packet []byte
done := make(chan struct{}) done := make(chan struct{})