bug: fix sending privileged commands on BTMiner using timeout as the port, and capture positional arguments in _send_bytes to prevent this.

This commit is contained in:
UpstreamData
2024-02-21 12:32:56 -07:00
parent a582ee63a0
commit 8f1408ce17
2 changed files with 2 additions and 1 deletions

View File

@@ -196,6 +196,7 @@ If you are sure you want to use this command please use API.send_command("{comma
async def _send_bytes(
self,
data: bytes,
*,
port: int = None,
timeout: int = 100,
) -> bytes:

View File

@@ -276,7 +276,7 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
logging.debug(f"{self} - (Send Privileged Command) - Sending")
try:
data = await self._send_bytes(enc_command, timeout)
data = await self._send_bytes(enc_command, timeout=timeout)
except (asyncio.CancelledError, asyncio.TimeoutError):
if ignore_errors:
return {}