mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-25 16:01:38 +00:00
Clean up session.go
This commit is contained in:
parent
11a7c5c458
commit
7a0b48ffb3
@ -5,7 +5,6 @@ package yggdrasil
|
|||||||
// The session information consists of crypto keys and coords
|
// The session information consists of crypto keys and coords
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
import "net"
|
|
||||||
|
|
||||||
type sessionInfo struct {
|
type sessionInfo struct {
|
||||||
core *Core
|
core *Core
|
||||||
@ -60,7 +59,6 @@ func (s *sessionInfo) update(p *sessionPing) bool {
|
|||||||
s.theirNonce = boxNonce{}
|
s.theirNonce = boxNonce{}
|
||||||
s.nonceMask = 0
|
s.nonceMask = 0
|
||||||
}
|
}
|
||||||
s.core.log.Printf("Received MTU %d from %s", p.mtu, net.IP(s.theirAddr[:]).String())
|
|
||||||
if p.mtu >= 1280 {
|
if p.mtu >= 1280 {
|
||||||
s.theirMTU = p.mtu
|
s.theirMTU = p.mtu
|
||||||
}
|
}
|
||||||
@ -205,7 +203,6 @@ func (sinfo *sessionInfo) close() {
|
|||||||
func (ss *sessions) getPing(sinfo *sessionInfo) sessionPing {
|
func (ss *sessions) getPing(sinfo *sessionInfo) sessionPing {
|
||||||
loc := ss.core.switchTable.getLocator()
|
loc := ss.core.switchTable.getLocator()
|
||||||
coords := loc.getCoords()
|
coords := loc.getCoords()
|
||||||
sinfo.core.log.Printf("Sending MTU %d to %s", sinfo.myMTU, net.IP(sinfo.theirAddr[:]).String())
|
|
||||||
ref := sessionPing{
|
ref := sessionPing{
|
||||||
sendPermPub: ss.core.boxPub,
|
sendPermPub: ss.core.boxPub,
|
||||||
handle: sinfo.myHandle,
|
handle: sinfo.myHandle,
|
||||||
|
Loading…
Reference in New Issue
Block a user