apple / apple/swift-nio-examples

TCPClient in json-rpc isn't thread-safe

Open
#37 2 comments 0 reactions 1 assignee Claimed by @tomerd View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.