Show More
@@ -397,7 +397,7 b' class socketlistener(server.socketlisten' | |||||
397 | self.register(timeout=timeout) |
|
397 | self.register(timeout=timeout) | |
398 |
|
398 | |||
399 | def handle_timeout(self): |
|
399 | def handle_timeout(self): | |
400 | pass |
|
400 | raise server.TimeoutException | |
401 |
|
401 | |||
402 | def handle_pollevents(self, events): |
|
402 | def handle_pollevents(self, events): | |
403 | for e in events: |
|
403 | for e in events: |
@@ -19,6 +19,8 b' import tempfile' | |||||
19 |
|
19 | |||
20 | class AlreadyStartedException(Exception): |
|
20 | class AlreadyStartedException(Exception): | |
21 | pass |
|
21 | pass | |
|
22 | class TimeoutException(Exception): | |||
|
23 | pass | |||
22 |
|
24 | |||
23 | def join(a, b): |
|
25 | def join(a, b): | |
24 | if a: |
|
26 | if a: | |
@@ -444,9 +446,11 b' else:' | |||||
444 | master = _server.master |
|
446 | master = _server.master | |
445 |
|
447 | |||
446 | def start(ui, dirstate, root, opts): |
|
448 | def start(ui, dirstate, root, opts): | |
447 | timeout = opts.get('timeout') |
|
449 | timeout = opts.get('idle_timeout') | |
448 | if timeout: |
|
450 | if timeout: | |
449 |
timeout = float(timeout) * |
|
451 | timeout = float(timeout) * 60000 | |
|
452 | else: | |||
|
453 | timeout = None | |||
450 |
|
454 | |||
451 | class service(object): |
|
455 | class service(object): | |
452 | def init(self): |
|
456 | def init(self): | |
@@ -457,7 +461,10 b' def start(ui, dirstate, root, opts):' | |||||
457 |
|
461 | |||
458 | def run(self): |
|
462 | def run(self): | |
459 | try: |
|
463 | try: | |
|
464 | try: | |||
460 | self.master.run() |
|
465 | self.master.run() | |
|
466 | except TimeoutException: | |||
|
467 | pass | |||
461 | finally: |
|
468 | finally: | |
462 | self.master.shutdown() |
|
469 | self.master.shutdown() | |
463 |
|
470 |
General Comments 0
You need to be logged in to leave comments.
Login now