Update api opener.
This commit is contained in:
@@ -362,8 +362,11 @@ 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()
|
||||||
|
for command in stage2_req:
|
||||||
try:
|
try:
|
||||||
await self._send_bytes(binascii.unhexlify(stage2_req), timeout=3, port=8889)
|
await self._send_bytes(
|
||||||
|
binascii.unhexlify(command), timeout=3, port=8889
|
||||||
|
)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
pass
|
pass
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user