dpp-nfc: Fix recv_octets() regression

The updated socket.poll() loop did not terminate properly in cases where
no response is available. Fix that to check for both False and None.

Fixes: 1733e356e4 ("dpp-nfc: Fix handover client wait for receiving handover select")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-08-15 00:19:46 +03:00 committed by Jouni Malinen
parent 90e05626f0
commit 55a366d7a8

View file

@ -280,7 +280,7 @@ class HandoverClient(nfc.handover.HandoverClient):
msg = bytearray()
while True:
poll_timeout = 0.1 if timeout is None or timeout > 0.1 else timeout
if self.socket.poll('recv', poll_timeout) is None:
if not self.socket.poll('recv', poll_timeout):
if timeout:
timeout -= time.time() - start
if timeout <= 0: