Untis-API: Download Bug behoben
This commit is contained in:
1 parent
34a9fdf73b
commit
1db16f8b69
3 files changed
+45
-5
No files matched your search
@@ -112,7 +112,17 @@ public class App : Application
|
||||
}
|
||||
finally
|
||||
{
|
||||
_serviceProvider.Dispose();
|
||||
// Der direkte WebUntis-Client meldet seine Sitzung asynchron ab. Ein synchrones
|
||||
// ServiceProvider.Dispose() lehnt reine IAsyncDisposable-Dienste ab und ließ die App
|
||||
// beim Schließen mit InvalidOperationException abstürzen.
|
||||
try
|
||||
{
|
||||
_serviceProvider.DisposeAsync().AsTask().GetAwaiter().GetResult();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AppBootstrapper.Logger.Error("Dienste konnten beim Beenden nicht vollständig freigegeben werden.", ex);
|
||||
}
|
||||
_serviceProvider = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user