Amebis / eduVPN

Windows eduVPN Client
GNU General Public License v3.0
40 stars 16 forks source link

call /disconnect when app quits #188

Closed ghost closed 2 years ago

ghost commented 2 years ago
  1. when eduVPN is running in the background and users shuts down Windows, /disconnect is not called
  2. when eduVPN is (completely) closed without disconnecting first, /disconnect is not called

    As Windows has no means to keep the VPN active without the eduVPN application running, it can clean up after itself when disconnecting.

Would also fix #171

ghost commented 2 years ago

I guess I was wrong regarding (2), the /disconnect does seem to happen, just delayed by ~5 seconds on my system, but that is no problem!

Am I also wrong regarding (1)? Is that supposed to work as well?

rozmansi commented 2 years ago

I ran some tests and can confirm that (2) works. Without any substantial delay on my system. Probably depends on how fast OpenVPN connection is dismantled.

And, I can also confirm that (1) does not work correctly. When the client main window is closed/hidden it fails to receive WM_ENDSESSION message and the process is killed - having no chance to call /disconnect.

ghost commented 2 years ago

I ran some tests and can confirm that (2) works. Without any substantial delay on my system. Probably depends on how fast OpenVPN connection is dismantled.

No, has nothing to do with OpenVPN, is the API call. But as said, it is fine!

And, I can also confirm that (1) does not work correctly. When the client main window is closed/hidden it fails to receive WM_ENDSESSION message and the process is killed - having no chance to call /disconnect.

Is this fixable?

rozmansi commented 2 years ago

I am not confortable with the current solution. There has to be a reliable way to perform whatever extensive cleanup is required on sign out. What if we had a database to flush and make consistent on user sign out?