(self)
| 349 | conn.close() |
| 350 | |
| 351 | def is_parent_alive(self): |
| 352 | # If our parent changed then we shut down. |
| 353 | if self.ppid != os.getppid(): |
| 354 | self.log.info("Parent changed, shutting down: %s", self) |
| 355 | return False |
| 356 | return True |
| 357 | |
| 358 | def wait_for_and_dispatch_events(self, timeout): |
| 359 | """Wait for events and dispatch callbacks.""" |