Unsolved Network Sockets + VPN Issue
-
Hey Gurus,
I have written a network chat program which consist of a server and client. Actually I'm really happy with it as it works a treat, and includes file transfers, encryption etc.
I am having an issue though. If someone connects to the server using a client, it runs for days without an issue, however, if they switch over to a VPN during that time, randomly the client will crash, and/or cause the server to crash. Now I understand why this may happen, having the network pulled out from underneath it and then reinstated via a VPN, but I don't get any indication that this has happened. No SocketError signal, no SocketState signal, nothing.
How can I do a clean disconnect from my server, if I don't know the user has done this?
How can I allow for this instance?Would anyone have any ideas please?
Thanks so much!
Steve Q. :-)
-
and you've open sourced your app and put it on a public git server, right?
-
@Kent-Dorfman no not at all. Not sure why I would do that? I don't want my code public. I'm a rank amateur and I'm sure people would run a mile if they saw my source. Lol :-)
-
If the app was open sourced then you may get useful responses about the problems you described. I'm not sure that folks with the expertise necessary to answer your arguably sophisticated question feel right about solving your problems for what comes across as a commercial endeavor. At least that's my suspicion.
-
@Kent-Dorfman no it's not a commercial endeavour at all. Actually I wrote it to keep in contact with my family and friends, some of whom don't have, nor want social media (my 80 year old parents for example), thus excluding Messenger and the like. Plus it was a steep learning curve for me. Also I had a spare Raspbery Pi I could use as a server, so I had a play with cross compiling the server under Linux. So no, your suspicion is incorrect, it's not commercial.
-
@steveq said in Network Sockets + VPN Issue:
if they switch over to a VPN during that time, randomly the client will crash, and/or cause the server to crash
Have already capture network traffic (at the server side for example) for the OK connections and the offending ones (when using VPN)?
I guess that will help you compare what's going on in both cases...