---
title: stopConnection(String profileName)
slug: isac/admin-guide/android/stopconnectionstring-profilename
docTags: 
createdAt: 2026-07-23T05:01:25.261Z
---

Stops an active VPN session for the specified VPN profile.

### Syntax:

int stopConnection(String profileName)

### Parameters:

The profileName is the name of the VPN profile.

### Returns:

This method returns 0 on success, 1 if the profile does not exist, and -1 on other errors.

When stopConnection() returns 0, it means that a VPN session is being shut down, but is not yet complete. The caller can call getState() to obtain the VPN state.

### Since:

R3
