Skip to content

Commit

Permalink
PIA-1776: Avoid throwing when reporting bytecount details
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-juan-docal committed May 7, 2024
1 parent f75f50a commit 8b63d3d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ internal class StartWireguardByteCountJob(

// region private
private fun jobAction(tunnelHandle: Int) {
val configuration = wireguard.configuration(tunnelHandle = tunnelHandle).getOrThrow()
val (tx, rx) = getByteCountFromConfigurationOutput(output = configuration).getOrThrow()
val configuration = wireguard.configuration(tunnelHandle = tunnelHandle).getOrElse {
return
}
val (tx, rx) = getByteCountFromConfigurationOutput(output = configuration).getOrElse {
return
}
cacheProtocol.reportByteCount(tx = tx, rx = rx)
}

Expand Down

0 comments on commit 8b63d3d

Please sign in to comment.