def stop(self): """Stop the thread """ BaseThread.stop(self) if self._server is not None: self._server.shutdown() self._server = None