5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-26 18:51:38 +00:00

Fix debug builds

This commit is contained in:
Neil Alexander 2019-03-04 19:04:09 +00:00
parent 0be0b078cb
commit 2b8648e2b3
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -449,19 +449,19 @@ func (c *Core) DEBUG_addSOCKSConn(socksaddr, peeraddr string) {
//* //*
func (c *Core) DEBUG_setupAndStartGlobalTCPInterface(addrport string) { func (c *Core) DEBUG_setupAndStartGlobalTCPInterface(addrport string) {
c.config.Listen = addrport c.config.Listen = []string{addrport}
if err := c.tcp.init(c /*, addrport, 0*/); err != nil { if err := c.link.init(c); err != nil {
c.log.Println("Failed to start TCP interface:", err) c.log.Println("Failed to start interfaces:", err)
panic(err) panic(err)
} }
} }
func (c *Core) DEBUG_getGlobalTCPAddr() *net.TCPAddr { func (c *Core) DEBUG_getGlobalTCPAddr() *net.TCPAddr {
return c.tcp.serv.Addr().(*net.TCPAddr) return c.link.tcp.getAddr()
} }
func (c *Core) DEBUG_addTCPConn(saddr string) { func (c *Core) DEBUG_addTCPConn(saddr string) {
c.tcp.call(saddr, nil, "") c.link.tcp.call(saddr, nil, "")
} }
//*/ //*/