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