File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -534,15 +534,19 @@ private static async Task StartInternally() {
534534 // Init history logger for /Api/Log usage
535535 Logging . InitHistoryLogger ( ) ;
536536
537- WebApplication webApplication = await CreateWebApplication ( ) . ConfigureAwait ( false ) ;
537+ WebApplication ? webApplication = null ;
538538
539539 try {
540540 // Start the server
541+ webApplication = await CreateWebApplication ( ) . ConfigureAwait ( false ) ;
542+
541543 await webApplication . StartAsync ( ) . ConfigureAwait ( false ) ;
542544 } catch ( Exception e ) {
543545 ASF . ArchiLogger . LogGenericException ( e ) ;
544546
545- await webApplication . DisposeAsync ( ) . ConfigureAwait ( false ) ;
547+ if ( webApplication != null ) {
548+ await webApplication . DisposeAsync ( ) . ConfigureAwait ( false ) ;
549+ }
546550
547551 return ;
548552 }
You can’t perform that action at this time.
0 commit comments