Except when a follower is not yet in the same party and is in a game, and the leader is out of game. Your code breaks this scenario I believe?
I think you are trying to say..
Follower is in a game (in town for example)
Leader is in a separate game (in town for example)
Not currently in a party
This kind of situation wouldn't happen unless you specifically set it up, no? Even so, your code ensures this fixes itself without the leader in game check.
Leader and follower aren't in the same party
Leader sends out invite
Follower accepts the invite
All is good. (I think?)
Where it breaks is if
Follower is in game.
Leader is in menus.
Currently in the same party.
BUT I just found it a few moments ago running a different profile that it seems D3 forces joined players out of a leaders game only in cases where the game has only been live for a short period of time. Using my code changes on longer runs means the follower cant tell when the leader has left and just sits around doing nothing while the leader is waiting for the follower to leave.
I now realize this is probably the underlying issue that I was trying to fix. I imagine you wrote SimpleFollow assuming followers had to leave the games themselves in
all cases? Getting forced out by the leader seems to confuse them! Something to look at for future releases maybe? Removing the leader check in this case prevents freuquent crashing and the join-leave-rejoin problem I was experiencing. In this case there's no need for a leader check except maybe if I was using YAR and the leaders client crashes?
I hope I explained this OK.