Merge change 8061 into donut
* changes: Throw a connecting exception when timed out.
This commit is contained in:
@@ -161,6 +161,7 @@ abstract class VpnService<E extends VpnProfile> {
|
|||||||
|
|
||||||
synchronized void onDisconnect(boolean cleanUpServices) {
|
synchronized void onDisconnect(boolean cleanUpServices) {
|
||||||
try {
|
try {
|
||||||
|
Log.d(TAG, " disconnecting VPN...");
|
||||||
mState = VpnState.DISCONNECTING;
|
mState = VpnState.DISCONNECTING;
|
||||||
broadcastConnectivity(VpnState.DISCONNECTING);
|
broadcastConnectivity(VpnState.DISCONNECTING);
|
||||||
mNotification.showDisconnect();
|
mNotification.showDisconnect();
|
||||||
@@ -217,6 +218,8 @@ abstract class VpnService<E extends VpnProfile> {
|
|||||||
synchronized (VpnService.this) {
|
synchronized (VpnService.this) {
|
||||||
if (mState == VpnState.CONNECTING) {
|
if (mState == VpnState.CONNECTING) {
|
||||||
Log.d(TAG, " connecting timed out !!");
|
Log.d(TAG, " connecting timed out !!");
|
||||||
|
mError = newConnectingError(
|
||||||
|
new IOException("Connecting timed out"));
|
||||||
onError();
|
onError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user