robertmrk / aiosfstream

Salesforce Streaming API client for asyncio
MIT License
47 stars 31 forks source link

Fix documentation's recommended value for disabling `connection_timeout` behavior #21

Open mparent61 opened 2 years ago

mparent61 commented 2 years ago

The documentation for disabling the connection_timeout functionality incorrectly says to use None, which fails MyPy type checking.

According to the aiocometd source code, this value must be an Integer or Float type:

https://github.com/robertmrk/aiocometd/blob/0.4.5/aiocometd/client.py#L42

And any "falsey" value will suffice here, as the logic to enable the timeout uses a if connection_timeout: conditional - https://github.com/robertmrk/aiocometd/blob/0.4.5/aiocometd/client.py#L458-L463.

So I've updated the documentation to specify 0 as the "disable timeout" value.