refactor sessions to store a pointer to router instead of core

This commit is contained in:
Arceliar 2019-08-23 20:53:00 -05:00
parent 5bb85cf07b
commit 436c84ca33
3 changed files with 30 additions and 27 deletions

View file

@ -252,7 +252,7 @@ func (c *Conn) Close() (err error) {
}
func (c *Conn) LocalAddr() crypto.NodeID {
return *crypto.GetNodeID(&c.session.core.boxPub)
return *crypto.GetNodeID(&c.core.boxPub)
}
func (c *Conn) RemoteAddr() crypto.NodeID {