sync: log on disconnect

This commit is contained in:
Abdullah Atta
2026-05-02 22:18:39 +05:00
parent 04b0c305ed
commit 815c8fb84c
+13
View File
@@ -122,6 +122,19 @@ namespace Notesnook.API.Hubs
await base.OnConnectedAsync();
}
public override async Task OnDisconnectedAsync(Exception? exception)
{
if (exception != null)
{
Logger.LogWarning(exception, "Connection {ConnectionId} disconnected with error (server-side drop)", Context.ConnectionId);
}
else
{
Logger.LogInformation("Connection {ConnectionId} disconnected cleanly (client-initiated)", Context.ConnectionId);
}
await base.OnDisconnectedAsync(exception);
}
public async Task<int> PushItems(string deviceId, SyncTransferItemV2 pushItem)
{