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:
@@ -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:
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user