apple / apple/swift-nio-examples
TCPClient in json-rpc isn't thread-safe
Open
- Dominant language
- Swift
- Stars
- 256
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/apple/swift-nio-examples/blob/d36c05aa4c1c21ca392ef5d612e73c6be439714a/json-rpc/Sources/JsonRpc/Client.swift#L20-L60
Thanks to @wlisac for the report.
At least `TCPClient` is very thread unsafe and really needs fixing. Without synchronisation, `state` is read/written to from different threads.
Contributor guide
Assessment
This issue has not been assessed yet.