mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Fix unit test
This commit is contained in:
parent
7afa23be4c
commit
a9ec3877b5
2 changed files with 12 additions and 18 deletions
|
@ -104,20 +104,6 @@ func (l *linkTCP) listen(ctx context.Context, url *url.URL, sintf string) (net.L
|
|||
return l.listenconfig.Listen(ctx, "tcp", hostport)
|
||||
}
|
||||
|
||||
// Returns the address of the listener.
|
||||
func (l *linkTCP) getAddr() *net.TCPAddr {
|
||||
// TODO: Fix this, because this will currently only give a single address
|
||||
// to multicast.go, which obviously is not great, but right now multicast.go
|
||||
// doesn't have the ability to send more than one address in a packet either
|
||||
var addr *net.TCPAddr
|
||||
phony.Block(l, func() {
|
||||
for li := range l._listeners {
|
||||
addr = li.listener.Addr().(*net.TCPAddr)
|
||||
}
|
||||
})
|
||||
return addr
|
||||
}
|
||||
|
||||
func (l *linkTCP) dialerFor(dst *net.TCPAddr, sintf string) (*net.Dialer, error) {
|
||||
if dst.IP.IsLinkLocalUnicast() {
|
||||
if sintf != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue