refactor(AuthClient): Enhance AuthClient with lazy initialization and connection error handling
- Replaced immediate connection start with lazy initialization via Lazy<Task<bool>>. - Added IsConnected and ConnectionError properties to track connection status and errors. - Introduced TryStartAsync method to safely attempt connection startup without throwing exceptions.
This commit is contained in:
@@ -3,4 +3,6 @@
|
||||
public interface IAuthClient : IAuthClientHandler
|
||||
{
|
||||
Task StartAsync();
|
||||
|
||||
Task<bool> TryStartAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user