Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: switch to github.com/coder/websocket#14227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
kylecarbs wants to merge1 commit intomainfromupdatews
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletioncoderd/healthcheck/websocket.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,8 +9,8 @@ import (
"strconv"
"time"

"github.com/coder/websocket"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/coderd/healthcheck/health"
"github.com/coder/coder/v2/codersdk/healthsdk"
Expand Down
2 changes: 1 addition & 1 deletioncoderd/httpapi/websocket.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import (
"context"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"

"cdr.dev/slog"
)
Expand Down
2 changes: 1 addition & 1 deletioncoderd/provisionerjobs.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,9 +10,9 @@ import (
"sort"
"strconv"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"cdr.dev/slog"

Expand Down
2 changes: 1 addition & 1 deletioncoderd/provisionerjobs_internal_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,11 +10,11 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"nhooyr.io/websocket"

"cdr.dev/slog/sloggers/slogtest"

Expand Down
2 changes: 1 addition & 1 deletioncoderd/workspaceagents.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,13 +14,13 @@ import (
"strings"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/sqlc-dev/pqtype"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"golang.org/x/sync/errgroup"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"

"cdr.dev/slog"
Expand Down
2 changes: 1 addition & 1 deletioncoderd/workspaceagentsrpc.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,10 +11,10 @@ import (
"sync/atomic"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"cdr.dev/slog"
"github.com/coder/coder/v2/agent/proto"
Expand Down
2 changes: 1 addition & 1 deletioncoderd/workspaceagentsrpc_internal_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,10 +10,10 @@ import (

"github.com/coder/coder/v2/coderd/util/ptr"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"nhooyr.io/websocket"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
Expand Down
2 changes: 1 addition & 1 deletioncoderd/workspaceapps/proxy.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,10 @@ import (
"strings"
"sync"

"github.com/coder/websocket"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"go.opentelemetry.io/otel/trace"
"nhooyr.io/websocket"

"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentssh"
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/agentsdk/agentsdk.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,10 @@ import (
"time"

"cloud.google.com/go/compute/metadata"
"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"storj.io/drpc"
"tailscale.com/tailcfg"

Expand Down
2 changes: 1 addition & 1 deletioncodersdk/provisionerdaemons.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,10 +9,10 @@ import (
"net/http/cookiejar"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/codersdk/drpc"
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/websocket.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import (
"context"
"net"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

// wsNetConn wraps net.Conn created by websocket.NetConn(). Cancel func
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/websocket_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,9 +6,9 @@ import (
"net/http/httptest"
"testing"

"github.com/coder/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/testutil"
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/workspaceagents.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,9 +10,9 @@ import (
"strings"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/coderd/tracing"
)
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/workspacesdk/connector.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,9 +12,9 @@ import (
"sync/atomic"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"storj.io/drpc"
"storj.io/drpc/drpcerr"
"tailscale.com/tailcfg"
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/workspacesdk/connector_internal_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,12 +9,12 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"storj.io/drpc"
"storj.io/drpc/drpcerr"
"tailscale.com/tailcfg"
Expand Down
2 changes: 1 addition & 1 deletioncodersdk/workspacesdk/workspacesdk.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,9 +12,9 @@ import (
"strconv"
"strings"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"
"tailscale.com/wgengine/capture"

Expand Down
2 changes: 1 addition & 1 deletionenterprise/coderd/provisionerdaemons.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,13 +9,13 @@ import (
"strings"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"github.com/moby/moby/pkg/namesgenerator"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/maps"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"storj.io/drpc/drpcmux"
"storj.io/drpc/drpcserver"

Expand Down
2 changes: 1 addition & 1 deletionenterprise/coderd/workspaceproxycoordinate.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,8 @@ package coderd
import (
"net/http"

"github.com/coder/websocket"
"github.com/google/uuid"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/coderd/httpapi"
Expand Down
4 changes: 2 additions & 2 deletionsenterprise/tailnet/workspaceproxy.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,9 +146,9 @@ func forwardNodesToWorkspaceProxy(ctx context.Context, conn net.Conn, ma agpl.Mu
return err
}

//nhooyr.io/websocket has a bugged implementation of deadlines on a websocket net.Conn. What they are
//github.com/coder/websocket has a bugged implementation of deadlines on a websocket net.Conn. What they are
// *supposed* to do is set a deadline for any subsequent writes to complete, otherwise the call to Write()
// fails. Whatnhooyr.io/websocket does is set a timer, after which it expires the websocket write context.
// fails. Whatgithub.com/coder/websocket does is set a timer, after which it expires the websocket write context.
// If this timer fires, then the next write will fail *even if we set a new write deadline*. So, after
// our successful write, it is important that we reset the deadline before it fires.
err = conn.SetWriteDeadline(time.Time{})
Expand Down
2 changes: 1 addition & 1 deletionenterprise/wsproxy/wsproxysdk/wsproxysdk.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,9 +8,9 @@ import (
"net/url"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"

"cdr.dev/slog"
Expand Down
2 changes: 1 addition & 1 deletionenterprise/wsproxy/wsproxysdk/wsproxysdk_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,13 +13,13 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"google.golang.org/protobuf/types/known/timestamppb"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"
"tailscale.com/types/key"

Expand Down
3 changes: 2 additions & 1 deletiongo.mod
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -87,6 +87,7 @@ require (
github.com/coder/quartz v0.1.0
github.com/coder/retry v1.5.1
github.com/coder/terraform-provider-coder v0.23.0
github.com/coder/websocket v1.8.12
github.com/coder/wgtunnel v0.1.13-0.20240522110300-ade90dfb2da0
github.com/coreos/go-oidc/v3 v3.11.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
Expand DownExpand Up@@ -188,7 +189,6 @@ require (
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v3 v3.0.1
gvisor.dev/gvisor v0.0.0-20240509041132-65b30f7869dc
nhooyr.io/websocket v1.8.7
storj.io/drpc v0.0.33
tailscale.com v1.46.1
)
Expand DownExpand Up@@ -219,6 +219,7 @@ require (
github.com/pion/transport/v2 v2.0.0 // indirect
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)

require (
Expand Down
2 changes: 2 additions & 0 deletionsgo.sum
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -223,6 +223,8 @@ github.com/coder/tailscale v1.1.1-0.20240702054557-aa558fbe5374 h1:a5Eg7D5e2oAc0
github.com/coder/tailscale v1.1.1-0.20240702054557-aa558fbe5374/go.mod h1:rp6BIJxCp127/hvvDWNkHC9MxAlKvQfoOtBr8s5sCqo=
github.com/coder/terraform-provider-coder v0.23.0 h1:DuNLWxhnGlXyG0g+OCAZRI6xd8+bJjIEnE4F3hYgA4E=
github.com/coder/terraform-provider-coder v0.23.0/go.mod h1:wMun9UZ9HT2CzF6qPPBup1odzBpVUc0/xSFoXgdI3tk=
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
github.com/coder/wgtunnel v0.1.13-0.20240522110300-ade90dfb2da0 h1:C2/eCr+r0a5Auuw3YOiSyLNHkdMtyCZHPFBx7syN4rk=
github.com/coder/wgtunnel v0.1.13-0.20240522110300-ade90dfb2da0/go.mod h1:qANbdpqyAGlo2bg+4gQKPj24H1ZWa3bQU2Q5/bV5B3Y=
github.com/coder/wireguard-go v0.0.0-20240522052547-769cdd7f7818 h1:bNhUTaKl3q0bFn78bBRq7iIwo72kNTvUD9Ll5TTzDDk=
Expand Down
2 changes: 1 addition & 1 deletionscaletest/workspacetraffic/conn.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@ import (
"sync"
"time"

"nhooyr.io/websocket"
"github.com/coder/websocket"

"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/workspacesdk"
Expand Down
2 changes: 1 addition & 1 deletionscaletest/workspacetraffic/countreadwriter.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import (

"golang.org/x/xerrors"

"nhooyr.io/websocket"
"github.com/coder/websocket"
)

// countReadWriteCloser wraps an io.ReadWriteCloser and counts the number of bytes read and written.
Expand Down
2 changes: 1 addition & 1 deletionscaletest/workspacetraffic/run.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,9 +9,9 @@ import (
"sync"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/sloghuman"
Expand Down
2 changes: 1 addition & 1 deletionscaletest/workspacetraffic/run_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,8 +12,8 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"golang.org/x/exp/slices"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/agent/agenttest"
"github.com/coder/coder/v2/coderd/coderdtest"
Expand Down
2 changes: 1 addition & 1 deletiontailnet/coordinator.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,9 +12,9 @@ import (
"sync"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"
"tailscale.com/types/key"

Expand Down
2 changes: 1 addition & 1 deletiontailnet/coordinator_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,11 +12,11 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"nhooyr.io/websocket"
"tailscale.com/tailcfg"
"tailscale.com/types/key"

Expand Down
2 changes: 1 addition & 1 deletiontailnet/derp.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@
"strings"
"sync"

"nhooyr.io/websocket"
"github.com/coder/websocket"
"tailscale.com/derp"
"tailscale.com/net/wsconn"
)
Expand DownExpand Up@@ -60,7 +60,7 @@
c.Close(websocket.StatusPolicyViolation, "client must speak the derp subprotocol")
return
}
wc := wsconn.NetConn(ctx, c, websocket.MessageBinary)

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-tailnet-integration

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-tailnet-integration

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-e2e

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-e2e

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn) (typecheck)

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn) (typecheck)

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ lint

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn) (typecheck)

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-e2e-enterprise

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-e2e-enterprise

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (macos-latest)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (macos-latest)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (macos-latest)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (macos-latest)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (ubuntu-latest)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (ubuntu-latest)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (ubuntu-latest)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (ubuntu-latest)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg-16

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg-16

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg-16

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-pg-16

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-race

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-race

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-race

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go-race

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (windows-2022)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (windows-2022)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (windows-2022)

cannot use c (variable of type *"github.com/coder/websocket".Conn) as *"nhooyr.io/websocket".Conn value in argument to wsconn.NetConn

Check failure on line 63 in tailnet/derp.go

View workflow job for this annotation

GitHub Actions/ test-go (windows-2022)

cannot use websocket.MessageBinary (constant 2 of type "github.com/coder/websocket".MessageType) as "nhooyr.io/websocket".MessageType value in argument to wsconn.NetConn
brw := bufio.NewReadWriter(bufio.NewReader(wc), bufio.NewWriter(wc))
s.Accept(ctx, wc, brw, r.RemoteAddr)
}), func() {
Expand Down
2 changes: 1 addition & 1 deletiontailnet/test/integration/integration.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,11 +22,11 @@ import (
"testing"
"time"

"github.com/coder/websocket"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
"tailscale.com/derp"
"tailscale.com/derp/derphttp"
"tailscale.com/tailcfg"
Expand Down
4 changes: 2 additions & 2 deletionstailnet/trackedconn.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -164,9 +164,9 @@ func (t *TrackedConn) SendUpdates() {
}
t.logger.Debug(t.ctx, "wrote nodes", slog.F("nodes", string(data)))

//nhooyr.io/websocket has a bugged implementation of deadlines on a websocket net.Conn. What they are
//github.com/coder/websocket has a bugged implementation of deadlines on a websocket net.Conn. What they are
// *supposed* to do is set a deadline for any subsequent writes to complete, otherwise the call to Write()
// fails. Whatnhooyr.io/websocket does is set a timer, after which it expires the websocket write context.
// fails. Whatgithub.com/coder/websocket does is set a timer, after which it expires the websocket write context.
// If this timer fires, then the next write will fail *even if we set a new write deadline*. So, after
// our successful write, it is important that we reset the deadline before it fires.
err = t.conn.SetWriteDeadline(time.Time{})
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp