mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-18 09:56:07 +00:00
Fix lint errors
This commit is contained in:
@ -158,7 +158,7 @@ func (c *Core) _stop() {
|
||||
c.addPeerTimer.Stop()
|
||||
c.addPeerTimer = nil
|
||||
}
|
||||
c.links.stop()
|
||||
_ = c.links.stop()
|
||||
/* FIXME this deadlocks, need a waitgroup or something to coordinate shutdown
|
||||
for _, peer := range c.GetPeers() {
|
||||
c.DisconnectPeer(peer.Port)
|
||||
|
@ -250,15 +250,3 @@ func (intf *link) close() {
|
||||
func (intf *link) name() string {
|
||||
return intf.lname
|
||||
}
|
||||
|
||||
func (intf *link) local() string {
|
||||
return intf.info.local
|
||||
}
|
||||
|
||||
func (intf *link) remote() string {
|
||||
return intf.info.remote
|
||||
}
|
||||
|
||||
func (intf *link) interfaceType() string {
|
||||
return intf.info.linkType
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ type tcpOptions struct {
|
||||
}
|
||||
|
||||
func (l *TcpListener) Stop() {
|
||||
defer func() { recover() }()
|
||||
defer func() { _ = recover() }()
|
||||
close(l.stop)
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ func (l *TcpListener) Stop() {
|
||||
func (t *tcp) setExtraOptions(c net.Conn) {
|
||||
switch sock := c.(type) {
|
||||
case *net.TCPConn:
|
||||
sock.SetNoDelay(true)
|
||||
_ = sock.SetNoDelay(true)
|
||||
// TODO something for socks5
|
||||
default:
|
||||
}
|
||||
|
Reference in New Issue
Block a user