Fix: infinite reconnect when using wireguard on Android 7 and 7.1
This commit is contained in:
parent
9236be7fbd
commit
fdcb994e7a
2 changed files with 7 additions and 2 deletions
|
|
@ -520,7 +520,9 @@ class VPNService : BaseVpnService(), LocalDnsService.Interface {
|
|||
peerBuilder.addAllowedIp(network)
|
||||
}
|
||||
}
|
||||
peerBuilder.setEndpoint(InetEndpoint.parse(peerConfig["Endpoint"]))
|
||||
val endpointConfig = peerConfig["Endpoint"]
|
||||
val endpoint = InetEndpoint.parse(endpointConfig)
|
||||
peerBuilder.setEndpoint(endpoint)
|
||||
peerConfig["PersistentKeepalive"]?.let {
|
||||
peerBuilder.setPersistentKeepalive(it.toInt())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue