mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-16 04:04:56 +02:00
No description
The sending mutex may be blocked due to the underlying conn blocking. If that happens then we can't call close since close also attempts to hold the sending mutex. Sending mutex is only used for serializing sends and doesn't protect the fields close reads/writes. I believe we introduced locking it so we would return ErrClosed. This commit instead introduces a check in send which rechecks if we have since closed while attempting to send. Test Plan: expanded the test coverage |
||
|---|---|---|
| .github/workflows | ||
| websocket | ||
| .travis.yml | ||
| async.go | ||
| call_opt.go | ||
| call_opt_test.go | ||
| codec_test.go | ||
| conn.go | ||
| conn_opt.go | ||
| conn_opt_test.go | ||
| conn_test.go | ||
| example_params_test.go | ||
| example_test.go | ||
| go.mod | ||
| go.sum | ||
| handler_with_error.go | ||
| internal_test.go | ||
| jsonrpc2.go | ||
| jsonrpc2_test.go | ||
| LICENSE | ||
| README.md | ||
| request.go | ||
| request_test.go | ||
| response.go | ||
| response_test.go | ||
| stream.go | ||
jsonrpc2: JSON-RPC 2.0 implementation for Go

Package jsonrpc2 provides a Go implementation of JSON-RPC 2.0.
Known issues
- Batch requests and responses are not yet supported.