aio-libs / aiohttp-sse

Server-sent events support for aiohttp
Other
194 stars 35 forks source link

Accept `float` type for ping interval value #446

Closed Olegt0rr closed 5 months ago

Olegt0rr commented 6 months ago

asyncio.sleep(...) method has a delay arg, which in turn is used in the loop.call_later(...) call, which accepts a float type as well as int:

delay number of seconds (can be either an int or a float)

Since ping interval is used as an argument for calling asyncio.sleep() only, we should accept float type for ping interval as well as int