[GH-ISSUE #2794] Stuck in infinite "Reconnecting..." loop when disconnecting OpenVPN over Cloak on Windows 11 #1273

Open
opened 2026-10-13 20:39:17 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Hamronov on GitHub (Jul 2, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2794

Describe the bug
When using AmneziaVPN (version 4.8.19.0) on Windows 11 with the OpenVPN over Cloak protocol, the application fails to terminate the connection properly. Clicking the "Disconnect" button triggers an infinite "Reconnecting..." state in the UI. The only way to stop it is to kill the process via Task Manager.

To Reproduce

Select a server with OpenVPN over Cloak protocol.
Click Connect and wait for a successful connection.
Click Disconnect.
The status changes to "Reconnecting..." and stays in this state indefinitely.
Expected behavior
The connection should terminate immediately, and the UI should return to the "Disconnected" state.

Logs & Technical Details
Based on preliminary observation, the issue seems to be a race condition/state conflict between the Cloak transport and the OpenVPN client:

Upon manual disconnection, the OpenVPN instance appears to receive a connection-reset or similar signal from the Cloak layer.
Instead of interpreting the disconnect as a "Stop" command, the OpenVPN client treats it as an accidental drop and triggers a SIGUSR1 (soft restart).
The Amnezia GUI becomes stuck waiting for the process to exit, while the process is trying to re-establish the tunnel.
Environment:

AmneziaVPN Version: 4.8.19.0
OS: Windows 11
Protocol: OpenVPN over Cloak
Installation method: Standard Windows Installer (installed via Amnezia client).
Possible Workarounds/Fixes suggested:

Adding remap-usr1 SIGTERM to the OpenVPN client configuration to force exit on resets.
Implementing explicit-exit-notify 1 (for UDP) or adjusting keepalive / ping-restart timers to be less aggressive during the shutdown phase.
Ensuring the GUI sends a hard SIGTERM or taskkill equivalent to the OpenVPN process when the user clicks "Disconnect".

Originally created by @Hamronov on GitHub (Jul 2, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2794 Describe the bug When using AmneziaVPN (version 4.8.19.0) on Windows 11 with the OpenVPN over Cloak protocol, the application fails to terminate the connection properly. Clicking the "Disconnect" button triggers an infinite "Reconnecting..." state in the UI. The only way to stop it is to kill the process via Task Manager. To Reproduce Select a server with OpenVPN over Cloak protocol. Click Connect and wait for a successful connection. Click Disconnect. The status changes to "Reconnecting..." and stays in this state indefinitely. Expected behavior The connection should terminate immediately, and the UI should return to the "Disconnected" state. Logs & Technical Details Based on preliminary observation, the issue seems to be a race condition/state conflict between the Cloak transport and the OpenVPN client: Upon manual disconnection, the OpenVPN instance appears to receive a connection-reset or similar signal from the Cloak layer. Instead of interpreting the disconnect as a "Stop" command, the OpenVPN client treats it as an accidental drop and triggers a SIGUSR1 (soft restart). The Amnezia GUI becomes stuck waiting for the process to exit, while the process is trying to re-establish the tunnel. Environment: AmneziaVPN Version: 4.8.19.0 OS: Windows 11 Protocol: OpenVPN over Cloak Installation method: Standard Windows Installer (installed via Amnezia client). Possible Workarounds/Fixes suggested: Adding remap-usr1 SIGTERM to the OpenVPN client configuration to force exit on resets. Implementing explicit-exit-notify 1 (for UDP) or adjusting keepalive / ping-restart timers to be less aggressive during the shutdown phase. Ensuring the GUI sends a hard SIGTERM or taskkill equivalent to the OpenVPN process when the user clicks "Disconnect".
Author
Owner

@Hamronov commented on GitHub (Jul 2, 2026):

Client-side configuration (Manual fix)
If you can edit the OpenVPN configuration within the Amnezia client (via the "Edit Configuration" or "Advanced" section for the protocol):

Map soft resets to hard termination:
Add this line to the client config:

remap-usr1 SIGTERM
connect-retry-max 1
<!-- gh-comment-id:4863946313 --> @Hamronov commented on GitHub (Jul 2, 2026): Client-side configuration (Manual fix) If you can edit the OpenVPN configuration within the Amnezia client (via the "Edit Configuration" or "Advanced" section for the protocol): Map soft resets to hard termination: Add this line to the client config: ``` remap-usr1 SIGTERM connect-retry-max 1 ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1273
No description provided.