ravening commented on a change in pull request #4635:
URL: https://github.com/apache/cloudstack/pull/4635#discussion_r704178957



##########
File path: 
server/src/main/java/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
##########
@@ -561,12 +561,12 @@ public Site2SiteVpnConnection 
resetVpnConnection(ResetVpnConnectionCmd cmd) thro
         }
         _accountMgr.checkAccess(caller, null, false, conn);
 
-        if (conn.getState() == State.Pending) {
-            conn.setState(State.Disconnected);
-        }
-        if (conn.getState() == State.Connected || conn.getState() == 
State.Error || conn.getState() == State.Disconnected) {
-            stopVpnConnection(id);
-        }
+        // Set vpn state to disconnected
+        conn.setState(State.Disconnected);
+        _vpnConnectionDao.persist(conn);

Review comment:
       @weizhouapache since we are restting the connection, it should transit 
to disconnect state irrecpective of the previous state. since we are stopping 
and starting the vpn connection, checking for pending state or any other state 
doesnt matter




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to