Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pr/167
Browse files Browse the repository at this point in the history
  • Loading branch information
peplin committed Mar 30, 2019
2 parents 2cab0a2 + 38fd55d commit c62a1f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygatt/backends/bgapi/bgapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _open_serial_port(self,
log.debug("Failed to open serial port", exc_info=True)
if self._ser:
self._ser.close()
elif attempt == 0:
elif attempt == (max_connection_attempts - 1):
raise NotConnectedError(
"No BGAPI compatible device detected")
self._ser = None
Expand Down

0 comments on commit c62a1f5

Please sign in to comment.