diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-27 22:40:55 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-27 22:40:55 +0200 |
commit | d8d2f93e64c508ac7c5048775460df86eea65ac2 (patch) | |
tree | b6f50eff3cc72d623b3f78566db0d013bc642a54 | |
parent | 4a74a0e20f12b25cc78cc5f5f82de8e595dcb13c (diff) |
WIP: start BGP server
-rw-r--r-- | tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java index 71c3b3d1..6e7f6096 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -475,8 +475,10 @@ public final class GoBackend implements Backend { am.cancel(alarmListener); am.setWindow(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + delayMillis * 3 / 4, delayMillis / 4, null, alarmListener, handler); - bgp = new Bgp(this, channel, currentTunnel, currentTunnelHandle); - bgp.startServer(); + if (bgp == null) { + bgp = new Bgp(this, channel, currentTunnel, currentTunnelHandle); + bgp.startServer(); + } currentTunnel.onDhcpChange(dhcp); } |