Skip to content

Commit 409269d

Browse files
AlgirdasPundziusmsimonides-proton
authored andcommitted
Add additional connection logs
1 parent 5ac21cf commit 409269d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/com/protonvpn/android/vpn/VpnConnectionManager.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class VpnConnectionManager @Inject constructor(
171171

172172
ProtonLogger.log(
173173
ConnStateChanged,
174-
"${unifiedState(newState)}, internal state: $newState, backend: ${activeBackend?.vpnProtocol}"
174+
"${unifiedState(newState)}, internal state: $newState, backend: ${activeBackend?.vpnProtocol}, fallback active: ${ongoingFallback?.isActive}"
175175
)
176176
DebugUtils.debugAssert {
177177
val isConnectedOrConnecting = state in arrayOf(
@@ -254,6 +254,8 @@ class VpnConnectionManager @Inject constructor(
254254
vpnStateMonitor.vpnConnectionNotificationFlow.emit(VpnFallbackResult.Error(ErrorType.MAX_SESSIONS))
255255
ProtonLogger.log(UserPlanMaxSessionsReached, "disconnecting")
256256
disconnect(DisconnectTrigger.Error("max sessions reached"))
257+
} else {
258+
ProtonLogger.logCustom(LogCategory.CONN_DISCONNECT, "disconnecting unrecoverably: $errorType.name")
257259
}
258260
}
259261

@@ -289,6 +291,7 @@ class VpnConnectionManager @Inject constructor(
289291
}
290292

291293
private suspend fun onServerNotAvailable(profile: Profile, server: Server?) {
294+
ProtonLogger.logCustom(LogCategory.CONN, "Current server unavailable")
292295
val fallback = if (server == null) {
293296
vpnErrorHandler.onServerNotAvailable(profile)
294297
} else {

0 commit comments

Comments
 (0)