From 9636b01935e1042229e468eeb70f707ff2fde0da Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 25 Nov 2025 16:39:09 +0100 Subject: [PATCH] Update 1.5.0.2 - fixing Websocket Reconnection workflow --- Controller/DeviceController.cs | 14 ++++++-------- iGotify Notification Assist.csproj | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Controller/DeviceController.cs b/Controller/DeviceController.cs index 5ea7058..f6153ad 100644 --- a/Controller/DeviceController.cs +++ b/Controller/DeviceController.cs @@ -40,8 +40,9 @@ public async Task PostDeviceModel(DeviceModel deviceModel) if (await deviceModel.Insert()) { - GotifySocketService.getInstance(); - GotifySocketService.StartWsThread(deviceModel.GotifyUrl, deviceModel.ClientToken); + var gss = GotifySocketService.getInstance(); + GotifySocketService.KillAllWsThread(); + gss.Start(); result = "Gerät erfolgreich hinzugefügt"; resultBool = true; } @@ -77,12 +78,9 @@ public async Task DeleteDevcice(string token) var usr = await DatabaseService.GetUser(token); if (await deviceModel.Delete()) { - if (usr.Uid > 0) - { - GotifySocketService.getInstance(); - GotifySocketService.KillWsThread(usr.ClientToken); - } - + var gss = GotifySocketService.getInstance(); + GotifySocketService.KillAllWsThread(); + gss.Start(); result = "Device deleted successfully!"; resultBool = true; } diff --git a/iGotify Notification Assist.csproj b/iGotify Notification Assist.csproj index 66bda2c..0c00fe5 100644 --- a/iGotify Notification Assist.csproj +++ b/iGotify Notification Assist.csproj @@ -6,8 +6,8 @@ enable true iGotify_Notification_Assist - 1.5.0.1 - 1.5.0.1 + 1.5.0.2 + 1.5.0.2 1.5.0.1 default