Skip to content

Commit

Permalink
Fix duplicate connection state change callback calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ameerhossein authored and markpash committed Feb 22, 2024
1 parent a6a3311 commit 6e6c129
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void onServiceDisconnected(ComponentName arg0) {
private void observeConnectionStatus() {
if (!isBound) return;
OblivionVpnService.registerConnectionStateObserver(getKey(), serviceMessenger, state -> {
if (lastKnownConnectionState == state) return;
lastKnownConnectionState = state;
onConnectionStateChange(state);
});
Expand Down

0 comments on commit 6e6c129

Please sign in to comment.