wgengine/magicsock: avoid some log spam on Plan 9

Updates #5794

Change-Id: I12e8417ebd553f9951690c388fbe42228f8c9097
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/15510/head
Brad Fitzpatrick 9 months ago committed by Brad Fitzpatrick
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…
Cancel
Save