telnetlib3 icon indicating copy to clipboard operation
telnetlib3 copied to clipboard

telnetlib3.open_connection timeout

Open morfair opened this issue 7 years ago • 2 comments

How to set timeout for open_connection()?

morfair avatar Jan 12 '18 09:01 morfair

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

parmentelat avatar May 30 '19 08:05 parmentelat

understood, it is needed yes, PRs welcome!

jquast avatar Feb 04 '21 03:02 jquast