Skip to content

Commit 1d4472c

Browse files
committed
fix(cli): Remove websocket message size limit
When the boundary client establishes a connection to the websocket used to communicate with a worker, it was configured with a max websocket message size of 32KiB. This was the default behavior for v1.8.7 of nhooyr/websocket. However, there are cases where the worker can send messages to the client that are larger than 32KiB. When this happens the client returns an error and terminates the connection. Notably this seems to only currently impact sessions made to SSH Targets, although it could theoretically impact any target type depending on the details of how the worker performs the writing of the messages. The issue can be reproduced by attempting to scp a large enough file from an SSH Target to the client. In this case the connection gets terminated and results in a partial transfer of the file. This message size limit appears to be unnecessary, and the default behavior is changing in v1.8.8 of nhooyr/websocket to make the message size unlimited. Since this version is not yet released, this commit switches the dependency to a fork with a version that is v1.8.7 plus the patch to disable the limit. Once v1.8.8 is release this dependency can be set back. See: coder/websocket#254 coder/websocket#256
1 parent 2180ad4 commit 1d4472c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,5 @@ require (
204204
gopkg.in/yaml.v3 v3.0.1 // indirect
205205
gorm.io/driver/sqlite v1.5.3 // indirect
206206
)
207+
208+
replace nhooyr.io/websocket => github.com/tmessi/websocket v0.0.0-20231006132118-662e2f7878ac

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj
727727
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
728728
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
729729
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
730+
github.com/tmessi/websocket v0.0.0-20231006132118-662e2f7878ac h1:ws8O6PTC7/A7JK8QQUqXEE+ZGEpk0QRXTCqncXIrKfQ=
731+
github.com/tmessi/websocket v0.0.0-20231006132118-662e2f7878ac/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
730732
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
731733
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
732734
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
@@ -1209,8 +1211,6 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
12091211
mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48=
12101212
mvdan.cc/gofumpt v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
12111213
mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ=
1212-
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
1213-
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
12141214
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
12151215
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
12161216
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

0 commit comments

Comments
 (0)