mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
control/controlclient: remove prior temporary macos debugging
It was an x/net/http2 bug, since fixed.
This commit is contained in:
parent
f33da73a82
commit
5b1d03f016
@ -18,7 +18,6 @@
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
@ -29,7 +28,6 @@
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"syscall"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tailscale/wireguard-go/wgcfg"
|
"github.com/tailscale/wireguard-go/wgcfg"
|
||||||
@ -576,11 +574,6 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM
|
|||||||
|
|
||||||
res, err := c.httpc.Do(req)
|
res, err := c.httpc.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Temproary (2020-10-29) issue 839 debugging:
|
|
||||||
if runtime.GOOS == "darwin" && (errors.Is(err, syscall.EADDRNOTAVAIL) || strings.Contains(err.Error(), "can't assign requested address")) {
|
|
||||||
vlogf = c.logf
|
|
||||||
debugAddrNotAvailalable(vlogf)
|
|
||||||
}
|
|
||||||
vlogf("netmap: Do: %v", err)
|
vlogf("netmap: Do: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -1058,35 +1051,3 @@ func TrimWGConfig() opt.Bool {
|
|||||||
v, _ := controlTrimWGConfig.Load().(opt.Bool)
|
v, _ := controlTrimWGConfig.Load().(opt.Bool)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temproary (2020-10-29) debugging for https://github.com/tailscale/tailscale/issues/839
|
|
||||||
func debugAddrNotAvailalable(logf logger.Logf) {
|
|
||||||
logf("EADDRNOTAVAIL-debug: [unexpected] got EADDRNOTAVAIL on " + runtime.GOOS)
|
|
||||||
var d net.Dialer
|
|
||||||
d.Timeout = 5 * time.Second
|
|
||||||
|
|
||||||
var c [2]net.Conn
|
|
||||||
var a [2]*net.TCPAddr
|
|
||||||
for i := range c {
|
|
||||||
var err error
|
|
||||||
c[i], err = d.Dial("tcp", "login.tailscale.com:80")
|
|
||||||
if err != nil {
|
|
||||||
logf("EADDRNOTAVAIL-debug: failed to debug dial tailscale %d/%d: %v", i+1, len(c), err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
defer c[i].Close()
|
|
||||||
a[i] = c[i].LocalAddr().(*net.TCPAddr)
|
|
||||||
}
|
|
||||||
if a[0].Port == a[1].Port {
|
|
||||||
logf("EADDRNOTAVAIL-debug: two trial connections had same source port")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
for i := range c {
|
|
||||||
_, err := io.WriteString(c[i], "HEAD / HTTP/1.0\r\n\r\n")
|
|
||||||
if err != nil {
|
|
||||||
logf("EADDRNOTAVAIL-debug: failed to write on connection %d post-dial: %v", i+1, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
logf("EADDRNOTAVAIL-debug: dial+writes normal")
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user