Skip to content

Commit 9636b01

Browse files
committed
Update 1.5.0.2
- fixing Websocket Reconnection workflow
1 parent 1bc246f commit 9636b01

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

Controller/DeviceController.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ public async Task<IActionResult> PostDeviceModel(DeviceModel deviceModel)
4040

4141
if (await deviceModel.Insert())
4242
{
43-
GotifySocketService.getInstance();
44-
GotifySocketService.StartWsThread(deviceModel.GotifyUrl, deviceModel.ClientToken);
43+
var gss = GotifySocketService.getInstance();
44+
GotifySocketService.KillAllWsThread();
45+
gss.Start();
4546
result = "Gerät erfolgreich hinzugefügt";
4647
resultBool = true;
4748
}
@@ -77,12 +78,9 @@ public async Task<IActionResult> DeleteDevcice(string token)
7778
var usr = await DatabaseService.GetUser(token);
7879
if (await deviceModel.Delete())
7980
{
80-
if (usr.Uid > 0)
81-
{
82-
GotifySocketService.getInstance();
83-
GotifySocketService.KillWsThread(usr.ClientToken);
84-
}
85-
81+
var gss = GotifySocketService.getInstance();
82+
GotifySocketService.KillAllWsThread();
83+
gss.Start();
8684
result = "Device deleted successfully!";
8785
resultBool = true;
8886
}

iGotify Notification Assist.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<InvariantGlobalization>true</InvariantGlobalization>
88
<RootNamespace>iGotify_Notification_Assist</RootNamespace>
9-
<AssemblyVersion>1.5.0.1</AssemblyVersion>
10-
<FileVersion>1.5.0.1</FileVersion>
9+
<AssemblyVersion>1.5.0.2</AssemblyVersion>
10+
<FileVersion>1.5.0.2</FileVersion>
1111
<Version>1.5.0.1</Version>
1212
<LangVersion>default</LangVersion>
1313
</PropertyGroup>

0 commit comments

Comments
 (0)