Added current pool username to get data

This commit is contained in:
UpstreamData
2021-10-19 15:17:42 -06:00
parent fdeb50ab76
commit f9cae8017c
2 changed files with 23 additions and 20 deletions

View File

@@ -30,8 +30,12 @@ class BaseMinerAPI:
return await self.send_command(command)
async def send_command(self, command: str, parameters: str = None) -> dict:
# get reader and writer streams
reader, writer = await asyncio.open_connection(str(self.ip), self.port)
try:
# get reader and writer streams
reader, writer = await asyncio.open_connection(str(self.ip), self.port)
except OSError as e:
if e.winerror == "121":
print("Semaphore Timeout has Expired.")
# create the command
cmd = {"command": command}