From 0b6b98e0a74ba9558628c14707688e2453f956e5 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Tue, 3 Oct 2023 19:43:07 -0400 Subject: [PATCH] device: add connection request failed error to expected ping responses --- lib/logitech_receiver/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logitech_receiver/base.py b/lib/logitech_receiver/base.py index 84f7fb05..c9dd1c63 100644 --- a/lib/logitech_receiver/base.py +++ b/lib/logitech_receiver/base.py @@ -534,8 +534,8 @@ def ping(handle, devnumber, long_message=False): error = ord(reply_data[3:4]) if error == _hidpp10.ERROR.invalid_SubID__command: # a valid reply from a HID++ 1.0 device return 1.0 - if error == _hidpp10.ERROR.resource_error: # device unreachable - return + if error == _hidpp10.ERROR.resource_error or error == _hidpp10.ERROR.connection_request_failed: + return # device unreachable if error == _hidpp10.ERROR.unknown_device: # no paired device with that number _log.error('(%s) device %d error on ping request: unknown device', handle, devnumber) raise NoSuchDevice(number=devnumber, request=request_id)