Merge branch '2.5.x' of dev.sourcefabric.org:airtime into 2.5.x
This commit is contained in:
commit
5463888947
|
@ -15,6 +15,8 @@ def __timeout(func, timeout_duration, default, args, kwargs):
|
||||||
while True:
|
while True:
|
||||||
it = InterruptableThread()
|
it = InterruptableThread()
|
||||||
it.start()
|
it.start()
|
||||||
|
if not first_attempt:
|
||||||
|
timeout_duration = timeout_duration * 2
|
||||||
it.join(timeout_duration)
|
it.join(timeout_duration)
|
||||||
|
|
||||||
if it.isAlive():
|
if it.isAlive():
|
||||||
|
@ -30,7 +32,7 @@ def __timeout(func, timeout_duration, default, args, kwargs):
|
||||||
|
|
||||||
first_attempt = False
|
first_attempt = False
|
||||||
|
|
||||||
def ls_timeout(f, timeout=4, default=None):
|
def ls_timeout(f, timeout=15, default=None):
|
||||||
def new_f(*args, **kwargs):
|
def new_f(*args, **kwargs):
|
||||||
return __timeout(f, timeout, default, args, kwargs)
|
return __timeout(f, timeout, default, args, kwargs)
|
||||||
return new_f
|
return new_f
|
||||||
|
|
Loading…
Reference in New Issue