telnetlib3
telnetlib3 copied to clipboard
telnetlib3.open_connection timeout
How to set timeout for open_connection()?
I'd like to +1 this one
my use case is that when remote server is up (which is not always the case) then it is expected to answer promptly; in that case we engage in a session that may last for some time - typically for ghosting system images, so we're talking minutes
OTOH when the node is down, I don't need to wait for more than 1 second before I decide it's not worth the wait
given that a call to open_connection
will last for the whole duration of the session, I can't use asyncio.wait_for
on a call to open_connection
as that would fire in normal conditions too
I can't seem to find a reference to a create_connection
, that would I believe be a nice angle here; or am I missing something ?
edit: this is about version 1.0.2
understood, it is needed yes, PRs welcome!