From edd85a0aea6dfd8530a28bf72a223f51562b6a3f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Sep 2026 10:46:37 +0000 Subject: [PATCH] fix(deps): update module github.com/sourcegraph/jsonrpc2 to v0.2.3 --- go.mod | 2 +- go.sum | 3 +++ vendor/github.com/sourcegraph/jsonrpc2/async.go | 3 ++- vendor/github.com/sourcegraph/jsonrpc2/conn.go | 11 +++++++++-- vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go | 10 ++++++---- vendor/modules.txt | 2 +- 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index fab6830f0..f1b1d201e 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/riverqueue/rivercontrib/otelriver v0.12.0 github.com/rodaine/table v1.3.1 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e - github.com/sourcegraph/jsonrpc2 v0.2.2 + github.com/sourcegraph/jsonrpc2 v0.2.3 github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.12.1 github.com/testcontainers/testcontainers-go v0.44.0 diff --git a/go.sum b/go.sum index 6d35d3ead..8e83ef779 100644 --- a/go.sum +++ b/go.sum @@ -277,6 +277,7 @@ github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.4 h1:9ZJYjPEJpcleIKcqysXOo14NLQYwu23fzmKRFpIjPjc= @@ -494,6 +495,8 @@ github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/sourcegraph/jsonrpc2 v0.2.2 h1:fCyU80iidEwcF9kWaj4ylOO1h8pT8P8sFGv8EKemLaw= github.com/sourcegraph/jsonrpc2 v0.2.2/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= +github.com/sourcegraph/jsonrpc2 v0.2.3 h1:0VYp5WZ2irQvRK8OKKxZAbbplj6Pmda07MXm+Mdz3GQ= +github.com/sourcegraph/jsonrpc2 v0.2.3/go.mod h1:0jBvyko0tdLpe6ntNSF/mvFalb/RPRXcmogoV47cEWc= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= diff --git a/vendor/github.com/sourcegraph/jsonrpc2/async.go b/vendor/github.com/sourcegraph/jsonrpc2/async.go index bc8a3708a..6cbdadd23 100644 --- a/vendor/github.com/sourcegraph/jsonrpc2/async.go +++ b/vendor/github.com/sourcegraph/jsonrpc2/async.go @@ -3,7 +3,8 @@ package jsonrpc2 import "context" // AsyncHandler wraps a Handler such that each request is handled in its own -// goroutine. It is a convenience wrapper. +// goroutine. Handlers may therefore start or finish in a different order than +// requests are received. It is a convenience wrapper. func AsyncHandler(h Handler) Handler { return asyncHandler{h} } diff --git a/vendor/github.com/sourcegraph/jsonrpc2/conn.go b/vendor/github.com/sourcegraph/jsonrpc2/conn.go index a9b14ac95..ef83a3142 100644 --- a/vendor/github.com/sourcegraph/jsonrpc2/conn.go +++ b/vendor/github.com/sourcegraph/jsonrpc2/conn.go @@ -156,7 +156,9 @@ func (c *Conn) Notify(ctx context.Context, method string, params interface{}, op return err } -// Reply sends a successful response with a result. +// Reply sends a successful response with a result. It returns after writing +// the response to the ObjectStream; it does not wait for the peer to receive or +// process the response. func (c *Conn) Reply(ctx context.Context, id ID, result interface{}) error { resp := &Response{ID: id} if err := resp.SetResult(result); err != nil { @@ -186,8 +188,9 @@ func (c *Conn) close(cause error) error { } c.closed = true - for _, call := range c.pending { + for id, call := range c.pending { close(call.done) + delete(c.pending, id) } close(c.disconnect) @@ -318,6 +321,10 @@ func (c *Conn) send(_ context.Context, m *anyMessage, wait bool) (cc *call, err // responses. if m.request != nil && wait { c.mu.Lock() + if c.closed { + c.mu.Unlock() + return nil, ErrClosed + } id = m.request.ID c.pending[id] = cc c.mu.Unlock() diff --git a/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go b/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go index 7d3e13231..8c145f21f 100644 --- a/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go +++ b/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go @@ -59,10 +59,12 @@ const ( // Handler handles JSON-RPC requests and notifications. type Handler interface { - // Handle is called to handle a request. No other requests are handled until - // it returns. If you do not require strict ordering behavior of received - // RPCs, it is suggested to wrap your handler in AsyncHandler. The context - // is automatically canceled when the connection closes. + // Handle is called to handle a request. While it is running, the connection + // does not process any other requests or responses. A handler that waits for + // a call's response must therefore run asynchronously. If you do not require + // strict ordering behavior of received RPCs, it is suggested to wrap your + // handler in AsyncHandler. The context is automatically canceled when the + // connection closes. Handle(context.Context, *Conn, *Request) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 4cc8b7fb4..15b4ca060 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -871,7 +871,7 @@ github.com/sirupsen/logrus github.com/skip2/go-qrcode github.com/skip2/go-qrcode/bitset github.com/skip2/go-qrcode/reedsolomon -# github.com/sourcegraph/jsonrpc2 v0.2.2 +# github.com/sourcegraph/jsonrpc2 v0.2.3 ## explicit; go 1.12 github.com/sourcegraph/jsonrpc2 github.com/sourcegraph/jsonrpc2/websocket