Unverified Commit 75c3fe24 authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by GitHub
Browse files

[http client]: request ID `Ordering::Relaxed` (#245)

Request ID is just a counter and doesn't require any synchronization besides an atomic value.
parent 23c44292
......@@ -49,7 +49,7 @@ impl Client for HttpClient {
P: Into<jsonrpc::Params> + Send,
{
// NOTE: `fetch_add` wraps on overflow which is intended.
let id = self.request_id.fetch_add(1, Ordering::SeqCst);
let id = self.request_id.fetch_add(1, Ordering::Relaxed);
let request = jsonrpc::Request::Single(jsonrpc::Call::MethodCall(jsonrpc::MethodCall {
jsonrpc: jsonrpc::Version::V2,
method: method.into(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment