Skip to content

Commit

Permalink
api: disable IPv6 in RpcClient (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Oct 6, 2023
1 parent 8060778 commit 3d178a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion neo3/api/noderpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
NEO RPC Node client and response classes.
"""
from __future__ import annotations

import socket

import aiohttp
import base64
import asyncio
Expand Down Expand Up @@ -798,7 +801,8 @@ def __init__(self, url: str, timeout: float = 3.0):
self.url = url
self.timeout = timeout
self.session = aiohttp.ClientSession(
timeout=aiohttp.ClientTimeout(total=self.timeout)
timeout=aiohttp.ClientTimeout(total=self.timeout),
connector=aiohttp.TCPConnector(family=socket.AF_INET),
)

async def _post(self, json: dict):
Expand Down

0 comments on commit 3d178a0

Please sign in to comment.