mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-02-26 00:23:09 +00:00
fixes ws rpc client bug: error when trying to connect to infura
fixes #109 previously, if using uri such as "wss://mainnet.infura.io/ws/v3/infura-id", the client will throw error. this bug already fixed in nim-websock, now this also fixed in json-rpc. it works when connected to infura wss.
This commit is contained in:
parent
a138c410c5
commit
318949a401
@ -78,16 +78,10 @@ proc connect*(client: RpcWebSocketClient, uri: string,
|
||||
else:
|
||||
@[]
|
||||
let uri = parseUri(uri)
|
||||
let secure = uri.scheme == "wss"
|
||||
let port = parseInt(uri.port)
|
||||
|
||||
let ws = await WebSocket.connect(
|
||||
host = uri.hostname,
|
||||
port = Port(port),
|
||||
path = uri.path,
|
||||
secure=secure,
|
||||
flags=flags,
|
||||
factories=ext
|
||||
uri=uri,
|
||||
factories=ext,
|
||||
flags=flags
|
||||
)
|
||||
client.transport = ws
|
||||
client.uri = uri
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user