]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
catch failures in startService() and abort process
authorrobk-org <robk-org@allmydata.com>
Tue, 5 Jun 2007 01:46:37 +0000 (18:46 -0700)
committerrobk-org <robk-org@allmydata.com>
Tue, 5 Jun 2007 01:46:37 +0000 (18:46 -0700)
src/allmydata/node.py

index 365f94974e3fba7137d88271b9a1a3ed6090ad26..6fcc0f094c670a47a5878b6c6c4dec138cbad770 100644 (file)
@@ -86,6 +86,13 @@ class Node(service.MultiService):
             self._tub_ready_observerlist.fire(self)
             return self
         d.addCallback(_ready)
+        def _die(failure):
+            self.log('_startService() failed')
+            log.err(failure)
+            #reactor.stop() # for unknown reasons, reactor.stop() isn't working.  [ ] TODO
+            self.log('calling os.abort()')
+            os.abort()
+        d.addErrback(_die)
 
     def stopService(self):
         self.log("Node.stopService")