mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
get rid of old buffered session packets
This commit is contained in:
parent
e7cb76cea3
commit
e88bef35c0
3 changed files with 3 additions and 15 deletions
|
@ -215,7 +215,7 @@ func (c *Conn) Write(b []byte) (bytesWritten int, err error) {
|
|||
}
|
||||
switch {
|
||||
case !sinfo.init:
|
||||
doSearch()
|
||||
sinfo.core.sessions.ping(sinfo)
|
||||
case time.Since(sinfo.time) > 6*time.Second:
|
||||
if sinfo.time.Before(sinfo.pingTime) && time.Since(sinfo.pingTime) > 6*time.Second {
|
||||
// TODO double check that the above condition is correct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue