Skip to content

Commit

Permalink
Update to latest gorilla/websocket library
Browse files Browse the repository at this point in the history
Now that upstream have merged our PR. Slightly modify our code
accordingly.

See:
* gorilla/websocket#745
* gorilla/websocket#746

Changelog: None

Signed-off-by: Lluis Campos <[email protected]>
  • Loading branch information
lluiscampos committed Jan 10, 2022
1 parent 6a1168a commit 8f509b8
Show file tree
Hide file tree
Showing 17 changed files with 123 additions and 212 deletions.
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package client

import (
"context"
"encoding/json"
"fmt"
"io"
Expand Down Expand Up @@ -679,7 +680,7 @@ func newWebsocketDialerTLS(conf Config) (*websocket.Dialer, error) {
}

dialer := websocket.Dialer{
NetDialTLS: func(network string, addr string) (net.Conn, error) {
NetDialTLSContext: func(_ context.Context, network string, addr string) (net.Conn, error) {
return dialOpenSSL(ctx, &conf, network, addr)
},
}
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bmatsuo/lmdb-go v1.6.1-0.20160816100615-69ad631904c9
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/godbus/dbus v4.1.0+incompatible
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.4.3-0.20220104015952-9111bb834a68
github.com/mendersoftware/mender-artifact v0.0.0-20210927105858-af2a3e3fb006
github.com/mendersoftware/openssl v1.1.0
github.com/mendersoftware/progressbar v0.0.3
Expand All @@ -21,5 +21,3 @@ require (
)

replace github.com/urfave/cli/v2 => github.com/mendersoftware/cli/v2 v2.1.1-minimal

replace github.com/gorilla/websocket => github.com/mendersoftware/websocket v1.4.3-0.20211210145825-8a45e5d03918
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4=
github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gorilla/websocket v1.4.3-0.20220104015952-9111bb834a68 h1:m6V3+LXduRWqp1rg8FMHBagwmNsgXMVj5PHVLYnPeVQ=
github.com/gorilla/websocket v1.4.3-0.20220104015952-9111bb834a68/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/klauspost/compress v1.10.5 h1:7q6vHIqubShURwQz8cQK6yIe/xC3IF0Vm7TGfqjewrc=
github.com/klauspost/compress v1.10.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
Expand All @@ -32,8 +34,6 @@ github.com/mendersoftware/openssl v1.1.0 h1:eRiG3CwzkMIna1xrTE9SiX9lrsme9irlb6i5
github.com/mendersoftware/openssl v1.1.0/go.mod h1:tikEC94q+Y0TU6r19L6mHzwruoTNYPEkrQPvsHEcQyU=
github.com/mendersoftware/progressbar v0.0.3 h1:AUdBGPvXO0l9i39rmXKZbEAPet2FzBeiG8b30D5/2Vc=
github.com/mendersoftware/progressbar v0.0.3/go.mod h1:NYaLNLhy3UXkRweGjhR3We3Q1ngmUmOWjC3+m8EzwjE=
github.com/mendersoftware/websocket v1.4.3-0.20211210145825-8a45e5d03918 h1:bxs2j1011PQiBPAP127cmBdAnw+zzq65tWOUeCFxVXU=
github.com/mendersoftware/websocket v1.4.3-0.20211210145825-8a45e5d03918/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down
39 changes: 7 additions & 32 deletions vendor/github.com/gorilla/websocket/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 18 additions & 29 deletions vendor/github.com/gorilla/websocket/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions vendor/github.com/gorilla/websocket/client_clone.go

This file was deleted.

39 changes: 0 additions & 39 deletions vendor/github.com/gorilla/websocket/client_clone_legacy.go

This file was deleted.

63 changes: 46 additions & 17 deletions vendor/github.com/gorilla/websocket/conn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f509b8

Please sign in to comment.