fix error 500
This commit is contained in:
@@ -162,6 +162,16 @@ class RFCOMMClient:
|
||||
loop.sock_connect(sock, (self._address, self._channel)),
|
||||
timeout=10.0,
|
||||
)
|
||||
except asyncio.TimeoutError as exc:
|
||||
sock.close()
|
||||
raise PrinterTimeout(
|
||||
f"Classic Bluetooth connection timed out to {self._address} (channel {self._channel})."
|
||||
) from exc
|
||||
except OSError as exc:
|
||||
sock.close()
|
||||
raise PrinterError(
|
||||
f"Classic Bluetooth connection failed for '{self._address}' (channel {self._channel}): {exc}"
|
||||
) from exc
|
||||
except Exception:
|
||||
sock.close()
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user