I've tried to search answers and found many, but those are working for older versions of .Net framework. I use 6.0.3.
My first approach was to find the function or procedure that gets called upon connection loss, tried to override the default reconnection function in the _Layout.cshtml file and found many solutions on various forums but those just simply don't work in my case.
Please don't hurt me, I'm not even a developer, but managed to implement all the features. This is the last needed thing.