| skipped 165 lines |
166 | 166 | | """ |
167 | 167 | | Closes the divert connection |
168 | 168 | | """ |
| 169 | + | self.logger.debug("Shutting down Divert engine...") |
169 | 170 | | if self.divert: |
| 171 | + | self.logger.debug("Closing Divert engine") |
170 | 172 | | self.divert.close() |
171 | 173 | | self.divert = None |
| 174 | + | |
| 175 | + | if self.divert_thread: |
| 176 | + | self.logger.debug("Joining divert thread") |
| 177 | + | self.divert_thread.join() |
| 178 | + | self.logger.debug("Shutdown complete.") |
172 | 179 | | |
173 | 180 | | def run_divert(self): |
174 | 181 | | """ |
| skipped 365 lines |