diff --git a/nats/aio/client.py b/nats/aio/client.py index 7f51a5c1..fdbd4d2e 100644 --- a/nats/aio/client.py +++ b/nats/aio/client.py @@ -985,9 +985,9 @@ async def flush(self, timeout: int = 10) -> None: raise errors.TimeoutError @property - def connected_url(self) -> Optional[str]: + def connected_url(self) -> Optional[ParseResult]: if self._current_server and self.is_connected: - return str(self._current_server.uri) + return self._current_server.uri return None @property