@@ -67,6 +67,8 @@ await _CriticalSection(() => {
67
67
return ;
68
68
}
69
69
70
+ #pragma warning disable 4014
71
+ // We don't want to wait for Signin to complete.
70
72
_Signin ( ) ;
71
73
}
72
74
@@ -150,7 +152,7 @@ await _CriticalSection(() => {
150
152
}
151
153
152
154
// The current code doesn't prevent SinginProcess from being called twice in parallel.
153
- SinginProcess ( ) ;
155
+ await SinginProcess ( ) ;
154
156
}
155
157
156
158
@@ -178,7 +180,7 @@ internal void OnPusherEvent(string eventName, PusherEvent pusherEvent) {
178
180
_watchlistFacade . OnPusherEvent ( eventName , pusherEvent ) ;
179
181
}
180
182
181
- private void _OnSigninSuccess ( PusherEvent pusherEvent ) {
183
+ private async void _OnSigninSuccess ( PusherEvent pusherEvent ) {
182
184
// Try to parse event
183
185
try {
184
186
String data = pusherEvent . Data ;
@@ -201,7 +203,7 @@ private void _OnSigninSuccess(PusherEvent pusherEvent) {
201
203
user = ParseUser ( userData ) ;
202
204
} catch ( Exception error ) {
203
205
Console . WriteLine ( $ "{ Environment . NewLine } error parsing user { error } ") ;
204
- this . _Cleanup ( error ) ;
206
+ await this . _Cleanup ( error ) ;
205
207
return ;
206
208
}
207
209
@@ -244,7 +246,7 @@ private async Task SinginProcess() {
244
246
string message = CreateSigninMessage ( authResponse ) ;
245
247
await connection . SendAsync ( message ) . ConfigureAwait ( false ) ;
246
248
} catch ( Exception error ) {
247
- this . _Cleanup ( error ) ;
249
+ await this . _Cleanup ( error ) ;
248
250
return ;
249
251
}
250
252
}
0 commit comments