mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-07 08:44:38 +00:00
wgengine/magicsock: avoid some log spam on Plan 9
Updates #5794 Change-Id: I12e8417ebd553f9951690c388fbe42228f8c9097 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
60847128df
commit
e3282c1632
@ -3018,6 +3018,10 @@ func (c *Conn) DebugForcePreferDERP(n int) {
|
||||
// portableTrySetSocketBuffer sets SO_SNDBUF and SO_RECVBUF on pconn to socketBufferSize,
|
||||
// logging an error if it occurs.
|
||||
func portableTrySetSocketBuffer(pconn nettype.PacketConn, logf logger.Logf) {
|
||||
if runtime.GOOS == "plan9" {
|
||||
// Not supported. Don't try. Avoid logspam.
|
||||
return
|
||||
}
|
||||
if c, ok := pconn.(*net.UDPConn); ok {
|
||||
// Attempt to increase the buffer size, and allow failures.
|
||||
if err := c.SetReadBuffer(socketBufferSize); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user