Always use fresh HTTP connections for EL communication

This commit is contained in:
Zahary Karadjov 2023-05-05 02:27:26 +03:00
parent 2bd9e5a54c
commit d784672c10
No known key found for this signature in database
GPG Key ID: C1F42EAFF38D570F
3 changed files with 5 additions and 3 deletions

View File

@ -678,7 +678,9 @@ func getJsonRpcRequestHeaders(jwtSecret: Option[seq[byte]]):
(proc(): seq[(string, string)] = @[])
proc newWeb3*(engineUrl: EngineApiUrl): Future[Web3] =
newWeb3(engineUrl.url, getJsonRpcRequestHeaders(engineUrl.jwtSecret))
newWeb3(engineUrl.url,
getJsonRpcRequestHeaders(engineUrl.jwtSecret),
httpFlags = {HttpClientFlag.NewConnectionAlways})
proc establishEngineApiConnection*(url: EngineApiUrl):
Future[Result[Web3, string]] {.async.} =

2
vendor/nim-json-rpc vendored

@ -1 +1 @@
Subproject commit af1276443618974a95dd3c83e57a1ecd70df2c5e
Subproject commit 172183e702a0e74052167839421aa8f43b7b9d0b

2
vendor/nim-web3 vendored

@ -1 +1 @@
Subproject commit 76a623ef9300d466bd16ffb1cfca1b1c77144e4c
Subproject commit c4fefea387303e88449339a3051a6779c7b4d226