Update websocket library (#3908)
The nhooyr/websocket library now has a release with the new default
behavior that removes the message size limit. This allows us to switch
off of the fork and back to the upstream.
In the same release that includes the fix we need for the boundary
client, the wspb helper package was removed from websocket. This package
contained some functions to read and write protobuf messages. However,
it was using the deprecated github.com/golang/protobuf/proto library. To
avoid this dependancy in the library they opted to just remove wspb.
Thus this provides a replacement implementation that uses
google.golang.org/protobuf/proto. Notably the newer proto library seems
to lack an equivalent of proto.NewBuffer so writes to the websocket and
not able to leverage a sync.Pool of byte.Buffers to reduce allocations.
Refs: 88bb253554
See: https://github.com/nhooyr/websocket/commit/ac385120c6e34fa6584f3856d5db949a21bbb65e
This commit is contained in:
1 parent
25961d98b1
commit
dd23f6fdbf
6 files changed
+78
-44
No files matched your search
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/hashicorp/boundary/api/targets"
|
||||
"github.com/hashicorp/boundary/globals"
|
||||
"github.com/hashicorp/boundary/internal/cmd/base"
|
||||
"github.com/hashicorp/boundary/internal/wspb"
|
||||
targetspb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets"
|
||||
"github.com/hashicorp/boundary/sdk/pbs/proxy"
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
@@ -36,7 +37,6 @@ import (
|
||||
exec "golang.org/x/sys/execabs"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"nhooyr.io/websocket"
|
||||
"nhooyr.io/websocket/wspb"
|
||||
)
|
||||
|
||||
const sessionCancelTimeout = 10 * time.Second
|
||||
|
||||
Reference in new issue
Block a user