File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
v2rayN/ServiceLib/ViewModels Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -548,8 +548,11 @@ public async Task Reload()
548
548
549
549
BlReloadEnabled = false ;
550
550
551
- await LoadCore ( ) ;
552
- await SysProxyHandler . UpdateSysProxy ( _config , false ) ;
551
+ await Task . Run ( async ( ) =>
552
+ {
553
+ await LoadCore ( ) ;
554
+ await SysProxyHandler . UpdateSysProxy ( _config , false ) ;
555
+ } ) ;
553
556
Locator . Current . GetService < StatusBarViewModel > ( ) ? . TestServerAvailability ( ) ;
554
557
555
558
_updateView ? . Invoke ( EViewAction . DispatcherReload , null ) ;
Original file line number Diff line number Diff line change @@ -318,7 +318,10 @@ public async Task TestServerAvailability()
318
318
319
319
_updateView ? . Invoke ( EViewAction . DispatcherServerAvailability , ResUI . Speedtesting ) ;
320
320
321
- var msg = await ( new UpdateService ( ) ) . RunAvailabilityCheck ( ) ;
321
+ var msg = await Task . Run ( async ( ) =>
322
+ {
323
+ return await ( new UpdateService ( ) ) . RunAvailabilityCheck ( ) ;
324
+ } ) ;
322
325
323
326
NoticeHandler . Instance . SendMessageEx ( msg ) ;
324
327
_updateView ? . Invoke ( EViewAction . DispatcherServerAvailability , msg ) ;
You can’t perform that action at this time.
0 commit comments