gatt-python icon indicating copy to clipboard operation
gatt-python copied to clipboard

Added timeout-option/parameter to start_discovery(...)

Open JlnWntr opened this issue 6 years ago • 2 comments

I had to re-open this pull-request, because I deleted my first fork of gatt-python. I'm sorry for that.

But I've now implemented blumberg's suggestion.

JlnWntr avatar Mar 26 '19 19:03 JlnWntr

Would it be an idea to have the default of 10 sec (10000 ms) in the function when the timeout parameter is missing? So that when it is not explicitly provided, that 10 sec is used; then the explicit option added in the "using" call could be omitted. If acceptable, perhaps an explicit 0 would have it not timeout, meaning that when timeout=0 is provided as parameter input, the discovery keeps on running (which is what I understand happened before this PR).

mdxs avatar Feb 21 '20 17:02 mdxs

I agree with @mdxs and go for a default timeout of 10s. It should also be documented what a value of None means for the timeout.

jlusiardi avatar Feb 25 '20 07:02 jlusiardi