Closed mojo-man closed 5 years ago
No, browser refresh will always cause new SignalR connection ID.
OK - When I have only a single browser connected, a refresh causes it to hit the constructor again in my multicast vm instance - if more than one are connected, the constructor is not hit. Perhaps I need to move things out of my constructor. Is there another event that I can use to refresh my VM when a new connection is made?
I also didn't realize that my Dispose got called every time that I refresh the browser. That is probably the issue. I am cleaning things up in there that shouldn't be cleaned up yet (because there are other browsers connected).
Similar topic was discussed here: https://github.com/dsuryd/dotNetify/issues/151.
I saw that - thanks. I am now debugging my dispose override. I think that's where the problem lies.
Everything is working well now. Thanks for your help Dicky!
Hi Dicky: I recently began experimenting with browsing to my app from non-localhost browsers. I modified my WebHost.CreateDefaultBuilder code (in Program.cs) to include .UseUrls("http://*:5000") and turned on debug logging. I find that when I initially connect - all is well. However - when I refresh, the console shows that I was given a new connection id - and all animation stops.
I am using the MulticastVM - so I expect that the connectionID should remain the same - correct?