diff --git a/go.mod b/go.mod index 319d74d..2d2e273 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.22.5 require ( connectrpc.com/connect v1.16.2 github.com/auth0/go-jwt-middleware/v2 v2.2.1 + github.com/coder/websocket v1.8.12 github.com/getsentry/sentry-go v0.28.1 github.com/go-jose/go-jose/v4 v4.0.4 github.com/google/uuid v1.6.0 @@ -20,7 +21,6 @@ require ( golang.org/x/oauth2 v0.22.0 gonum.org/v1/gonum v0.15.0 google.golang.org/protobuf v1.34.2 - nhooyr.io/websocket v1.8.11 ) require ( diff --git a/go.sum b/go.sum index da3ee1f..a3652a2 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= github.com/auth0/go-jwt-middleware/v2 v2.2.1 h1:pqxEIwlCztD0T9ZygGfOrw4NK/F9iotnCnPJVADKbkE= github.com/auth0/go-jwt-middleware/v2 v2.2.1/go.mod h1:CSi0tuu0QrALbWdiQZwqFL8SbBhj4e2MJzkvNfjY0Us= +github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo= +github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -81,5 +83,3 @@ gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEI gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= -nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= diff --git a/sdpws/client.go b/sdpws/client.go index e2aef9e..5a631a2 100644 --- a/sdpws/client.go +++ b/sdpws/client.go @@ -8,12 +8,12 @@ import ( "net/http" "sync" + "github.com/coder/websocket" "github.com/google/uuid" "github.com/overmindtech/sdp-go" log "github.com/sirupsen/logrus" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "google.golang.org/protobuf/proto" - "nhooyr.io/websocket" ) // Client is the main driver for all interactions with a SDP/Gateway websocket. @@ -97,7 +97,7 @@ func dialImpl(ctx context.Context, u string, httpClient *http.Client, handler Ga } } - // nolint: bodyclose // nhooyr.io/websocket reads the body internally + // nolint: bodyclose // github.com/coder/websocket reads the body internally conn, _, err := websocket.Dial(ctx, u, options) if err != nil { return nil, err diff --git a/sdpws/client_test.go b/sdpws/client_test.go index 18105af..1c797ff 100644 --- a/sdpws/client_test.go +++ b/sdpws/client_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" + "github.com/coder/websocket" "github.com/google/uuid" "github.com/overmindtech/sdp-go" "go.uber.org/goleak" "google.golang.org/protobuf/proto" - "nhooyr.io/websocket" ) // TestServer is a test server for the websocket client. Note that this can only