summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-01-03 10:57:35 -0800
committerAnthony Young <sleepsonthefloor@gmail.com>2011-01-03 10:57:35 -0800
commitb289812d388cf8e612ddff5ea13f7dc41a6bc359 (patch)
treec680093cfb9bbfda5d03085bcedb92a753760197
parent8df8dd5cedb8bd84053fa489df8b9cf34ee68895 (diff)
downloadnova-b289812d388cf8e612ddff5ea13f7dc41a6bc359.tar.gz
nova-b289812d388cf8e612ddff5ea13f7dc41a6bc359.tar.xz
nova-b289812d388cf8e612ddff5ea13f7dc41a6bc359.zip
add timeout constant, set to 5 minutes
-rwxr-xr-xtools/ajaxterm/ajaxterm.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ajaxterm/ajaxterm.py b/tools/ajaxterm/ajaxterm.py
index e2c156fd7..bf27b264a 100755
--- a/tools/ajaxterm/ajaxterm.py
+++ b/tools/ajaxterm/ajaxterm.py
@@ -12,6 +12,7 @@ import qweb
import string, subprocess, uuid
global g_server
+TIMEOUT=300
class Terminal:
def __init__(self,width=80,height=24):
@@ -434,7 +435,7 @@ class Multiplex:
t=time.time()
for i in self.proc.keys():
t0=self.proc[i]['time']
- if (t-t0)>120:
+ if (t-t0)>TIMEOUT:
try:
os.close(i)
os.kill(self.proc[i]['pid'],signal.SIGTERM)
@@ -465,7 +466,7 @@ class Multiplex:
while self.run():
fds=self.fds()
i,o,e=select.select(fds, [], [], 1.0)
- if time.time() - self.lastActivity > 120:
+ if time.time() - self.lastActivity > TIMEOUT:
global g_server
g_server.shutdown()
for fd in i: