comparison hgext/inotify/linuxserver.py @ 10494:08064db9f005 stable

inotify/inserve: implement --timeout-idle option (issue885) hg inserve was ignoring and miscomputing the --timeout-idle option (seconds vs. minutes). Thanks to Jesse Glick for the bugreport and the initial patch.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 17 Feb 2010 20:44:49 +0100
parents 5ddde896a19d
children 34cc8b84407f
comparison
equal deleted inserted replaced
10493:283f3b413f19 10494:08064db9f005
395 def __init__(self, ui, root, repowatcher, timeout): 395 def __init__(self, ui, root, repowatcher, timeout):
396 server.socketlistener.__init__(self, ui, root, repowatcher, timeout) 396 server.socketlistener.__init__(self, ui, root, repowatcher, timeout)
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:
404 self.accept_connection() 404 self.accept_connection()
405 405