Skip to content

Adding timeout argument to commands to prevent hanging.#319

Open
cspensky wants to merge 5 commits intoIanHarvey:masterfrom
Allthenticate:master
Open

Adding timeout argument to commands to prevent hanging.#319
cspensky wants to merge 5 commits intoIanHarvey:masterfrom
Allthenticate:master

Conversation

@cspensky
Copy link

I picked defaults that made sense to me, feel free to modify._

cmd += ' %s' % UUID(uuid)
self._writeCmd(cmd + "\n")
rsp = self._getResp('find')
rsp = self._getResp('find', timeout=timeout)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is cool however if the timeout is reached, it returns a None here and so then the code can't be gracefully handled.. maybe a raised error or more handling like what you did for readCharacteristic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants