Stop the active tunnel if any.
(self)
| 71 | raise |
| 72 | |
| 73 | def stop_tunnel(self) -> None: |
| 74 | """Stop the active tunnel if any.""" |
| 75 | if self.active_tunnel: |
| 76 | self.active_tunnel.stop() |
| 77 | self.active_tunnel = None |
| 78 | logger.info("Tunnel stopped") |
| 79 | else: |
| 80 | logger.debug("No active tunnel to stop") |
| 81 | |
| 82 | def get_public_url(self) -> Optional[str]: |
| 83 | """Get the public URL of the active tunnel. |