This commit is contained in:
2026-02-19 10:07:43 +00:00
parent 007438e372
commit 6e637ecf77
1763 changed files with 60820 additions and 279516 deletions

View File

@@ -2,9 +2,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// Package wsconn contains an adapter type that turns
// a websocket connection into a net.Conn. It a temporary fork of the
// netconn.go file from the github.com/coder/websocket package while we wait for
// https://github.com/nhooyr/websocket/pull/350 to be merged.
// a websocket connection into a net.Conn.
package wsconn
import (
@@ -14,11 +12,11 @@ import (
"math"
"net"
"os"
"sync"
"sync/atomic"
"time"
"github.com/coder/websocket"
"tailscale.com/syncs"
)
// NetConn converts a *websocket.Conn into a net.Conn.
@@ -104,7 +102,7 @@ type netConn struct {
reading atomic.Bool
afterReadDeadline atomic.Bool
readMu sync.Mutex
readMu syncs.Mutex
// eofed is true if the reader should return io.EOF from the Read call.
//
// +checklocks:readMu