@@ -115,24 +115,24 @@ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs ar
115
115
if ( rpcController . GetState ( ) . RpcLifecycle == RpcLifecycle . Disconnected )
116
116
// Passing in a CT with no cancellation is desired here, because
117
117
// the named pipe open will block until the pipe comes up.
118
- // TODO: log
119
- _ = rpcController . Reconnect ( CancellationToken . None ) . ContinueWith ( t =>
118
+ _logger . LogDebug ( "reconnecting with VPN service" ) ;
119
+ _ = rpcController . Reconnect ( CancellationToken . None ) . ContinueWith ( t =>
120
+ {
121
+ if ( t . Exception != null )
120
122
{
123
+ _logger . LogError ( t . Exception , "failed to connect to VPN service" ) ;
121
124
#if DEBUG
122
- if ( t . Exception != null )
123
- {
124
- Debug . WriteLine ( t . Exception ) ;
125
- Debugger . Break ( ) ;
126
- }
125
+ Debug . WriteLine ( t . Exception ) ;
126
+ Debugger . Break ( ) ;
127
127
#endif
128
- } ) ;
128
+ }
129
+ } ) ;
129
130
130
131
// Load the credentials in the background.
131
132
var credentialManagerCts = new CancellationTokenSource ( TimeSpan . FromSeconds ( 15 ) ) ;
132
133
var credentialManager = _services . GetRequiredService < ICredentialManager > ( ) ;
133
134
_ = credentialManager . LoadCredentials ( credentialManagerCts . Token ) . ContinueWith ( t =>
134
135
{
135
- // TODO: log
136
136
if ( t . Exception != null )
137
137
{
138
138
_logger . LogError ( t . Exception , "failed to load credentials" ) ;
@@ -150,7 +150,6 @@ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs ar
150
150
var syncSessionController = _services . GetRequiredService < ISyncSessionController > ( ) ;
151
151
_ = syncSessionController . RefreshState ( syncSessionCts . Token ) . ContinueWith ( t =>
152
152
{
153
- // TODO: log
154
153
if ( t . IsCanceled || t . Exception != null )
155
154
{
156
155
_logger . LogError ( t . Exception , "failed to refresh sync state (canceled = {canceled})" , t . IsCanceled ) ;
0 commit comments