oddbear / GoXLR-TouchPortal-Plugin

A plugin for TouchPortal that works like the StreamDeck plugin.
MIT License
15 stars 3 forks source link

Pressing reconnect button creates "multiple connections" #19

Closed oddbear closed 3 years ago

oddbear commented 3 years ago

Minor issue (have only seen this bug in this scenario, and we can always just restart the GoXLR App).

Just found this button now. image

There seems to be an issue if we click it. Need to close the old connection and remove it from the list. image

And update the Wiki after this is fixed.

oddbear commented 3 years ago

This was a strange issue... but the issue must be in the GoXLR App. The payload was null in the message itself. So don't think this would be possible to fix on my end, but will investigate further. (this is where notifications would be awesome).

[2021.05.08 14:15:37] fail: GoXLR.Server.GoXLRServer[0]
      System.InvalidOperationException: The requested operation requires an element of type 'Object', but the target element has type 'Null'.
         at System.Text.Json.JsonDocument.TryGetNamedPropertyValue(Int32 index, ReadOnlySpan`1 propertyName, JsonElement& value)
         at System.Text.Json.JsonElement.GetProperty(String propertyName)
         at GoXLR.Server.GoXLRServer.<>c__DisplayClass12_0.<OnClientConnecting>b__3(String message) in C:\Users\oddbj\source\repos\GoXLR TouchPortal Plugin\Server\GoXLR.Server\GoXLRServer.cs:line 109
oddbear commented 3 years ago

After some investigation, this seems to quite interesting. The GoXLR App does not actually close the previous connections on reconnect, however it does close (only) the last opened on exit.

It is therefor possible to have multiple connections at the same time, to the same GoXLR App.