crossbario / txaio-etcd

A Twisted client for etcd3
MIT License
14 stars 6 forks source link

Configurable timeout setting #4

Closed bra-fsn closed 7 years ago

bra-fsn commented 7 years ago

Hi,

When I run this code:

try:
  r=yield etcd.set(b'key1', b'foobar')
  print r
except Exception:
  traceback.print_exc()

with a server, which is SIGSTOP-ped (so I can open a TCP connection to it, but it won't produce any answer), the program never gets through etcd.set, it doesn't time out. (at least not for some minutes) lt would be good to have a configurable timeout.

oberstet commented 7 years ago

Should be straight forward using the timeout parameter of treq (here.

So we need an additional timeout keyword parameter in basically all public methods like txaioetcd.Client.get.

oberstet commented 7 years ago

implemented in v0.2.0