Removing server init from the app init. Making sure server connection is established before doing a request. Handling Connecting state.

This commit is contained in:
Burak Kaan Köse
2024-08-11 15:25:40 +02:00
parent 6d08368462
commit 983bc21448
7 changed files with 74 additions and 55 deletions

View File

@@ -173,7 +173,7 @@ namespace Wino.Server
if (status != AppServiceConnectionStatus.Success)
{
// TODO: Handle connection error
Log.Error("Opening server connection failed. Status: {status}", status);
DisposeConnection();
}
@@ -224,8 +224,6 @@ namespace Wino.Server
private void OnConnectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args)
{
// TODO: Handle connection closed.
// UWP app might've been terminated or suspended.
// At this point, we must keep active synchronizations going, but connection is lost.
// As long as this process is alive, database will be kept updated, but no messages will be sent.