'This should only be called by the shutdown trigger.'

def finalClose(self):

    self.shutdownID = None
    self.threadpool.stop()
    self.running = False
    for conn in self.connections.values():
        self._close(conn)
    self.connections.clear()
