Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db4ce870 authored by Junyu Lai's avatar Junyu Lai Committed by Gerrit Code Review
Browse files

Merge "Remove dead KeepaliveInfo if it cannot be started"

parents 1f4cce2f 5e7128d7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -185,13 +185,13 @@ public class KeepaliveTracker {
        }

        void start(int slot) {
            mSlot = slot;
            int error = isValid();
            if (error == SUCCESS) {
                mSlot = slot;
                Log.d(TAG, "Starting keepalive " + mSlot + " on " + mNai.name());
                mNai.asyncChannel.sendMessage(CMD_START_PACKET_KEEPALIVE, slot, mInterval, mPacket);
            } else {
                notifyMessenger(NO_KEEPALIVE, error);
                handleStopKeepalive(mNai, mSlot, error);
                return;
            }
        }
@@ -277,6 +277,7 @@ public class KeepaliveTracker {
            return;
        }
        ki.stop(reason);
        Log.d(TAG, "Stopped keepalive " + slot + " on " + networkName);
        networkKeepalives.remove(slot);
        if (networkKeepalives.isEmpty()) {
            mKeepalives.remove(nai);