Skip to content

Commit 924e8fe

Browse files
committed
Fixed connection retry crashing due to serialization issue.
1 parent 0494423 commit 924e8fe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

PowerSync/PowerSync.Common/DB/Crud/SyncStatus.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,24 @@ public class SyncDataFlowStatus
1010
[JsonProperty("uploading")]
1111
public bool Uploading { get; set; } = false;
1212

13+
[JsonProperty("downloadError")]
14+
public string? DownloadErrorMessage => DownloadError?.Message;
15+
16+
[JsonProperty("uploadError")]
17+
public string? UploadErrorMessage => UploadError?.Message;
18+
1319
/// <summary>
1420
/// Error during downloading (including connecting).
1521
/// Cleared on the next successful data download.
1622
/// </summary>
17-
[JsonProperty("downloadError")]
23+
[JsonIgnore]
1824
public Exception? DownloadError { get; set; } = null;
1925

2026
/// <summary>
2127
/// Error during uploading.
2228
/// Cleared on the next successful upload.
2329
/// </summary>
24-
[JsonProperty("uploadError")]
30+
[JsonIgnore]
2531
public Exception? UploadError { get; set; } = null;
2632
}
2733

demos/TodoSQLite/Views/ListsPage.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ protected override async void OnAppearing()
2323
{
2424
if (update.StatusChanged != null)
2525
{
26-
Console.WriteLine("XXX Connected: " +update.StatusChanged.Connected);
2726
MainThread.BeginInvokeOnMainThread(() =>
2827
{
2928
WifiStatusItem.IconImageSource = update.StatusChanged.Connected ? "wifi.png" : "wifi_off.png";

0 commit comments

Comments
 (0)