• Matthew Slipper's avatar
    proxyd: Fix concurrent WS write panic (#2711) · 552cd641
    Matthew Slipper authored
    Fixes a panic in the websocket proxyd logic. Normally, the `clientPump` and `backendPump` methods in `WSProxier` send data in one direction. However, when the client sends an invalid RPC, the `clientPump` will send a response _directly to the client_ in order to avoid unnecessary roundtrips to the backend. This could be interleaved with concurrent writes to the client's WS in `backendPump`, and would cause a panic in the WS library.
    
    To test this, this PR includes a dedicated integration test that reliably triggers the issue. In addition, this PR adds additional testing for WS functionality.
    552cd641
Name
Last commit
Last update
..
cmd/proxyd Loading commit data...
integration_tests Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
Dockerfile Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
backend.go Loading commit data...
cache.go Loading commit data...
cache_test.go Loading commit data...
config.go Loading commit data...
entrypoint.sh Loading commit data...
errors.go Loading commit data...
example.config.toml Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
lvc.go Loading commit data...
methods.go Loading commit data...
metrics.go Loading commit data...
package.json Loading commit data...
proxyd.go Loading commit data...
rate_limiter.go Loading commit data...
rpc.go Loading commit data...
rpc_test.go Loading commit data...
server.go Loading commit data...
string_set.go Loading commit data...
tls.go Loading commit data...