Update api opener.

This commit is contained in:
UpstreamData
2024-02-09 13:39:48 -07:00
parent c50d55e87c
commit 5c5d688ffa

View File

@@ -362,10 +362,13 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
json={"ip": self.ip, "stage1_result": stage1_res.decode("utf-8")}, json={"ip": self.ip, "stage1_result": stage1_res.decode("utf-8")},
) )
).json() ).json()
try: for command in stage2_req:
await self._send_bytes(binascii.unhexlify(stage2_req), timeout=3, port=8889) try:
except asyncio.TimeoutError: await self._send_bytes(
pass binascii.unhexlify(command), timeout=3, port=8889
)
except asyncio.TimeoutError:
pass
return True return True
#### PRIVILEGED COMMANDS #### #### PRIVILEGED COMMANDS ####