don't drop duplicate reconnect

When Android client is backgrounded with a game playing (BoardActivity
on top) then brought to front again it fails to reconnect to relay
because it didn't disconnect and the relay thinks it's still there. The
right fix is in making the java code do the right thing (complete
disconnect), but it seems harmless to just honor the reconnect in this
case. Doesn't even cause leaks, per valgrind.
This commit is contained in:
Eric House 2017-06-06 06:27:58 -07:00
parent 59285aa9f4
commit f06e7bdd98

View file

@ -248,12 +248,11 @@ CookieRef::_Reconnect( int clientVersion, DevID* devID, HostID hid,
logf( XW_LOGINFO, "%s: failing because spot taken", __func__ );
} else {
if ( alreadyHere ) {
logf( XW_LOGINFO, "%s: dropping because already here",
__func__ );
} else {
pushReconnectEvent( clientVersion, devID, hid, nPlayersH,
nPlayersS, seed, addr );
logf( XW_LOGERROR, "%s: dropping because already here", __func__ );
}
pushReconnectEvent( clientVersion, devID, hid, nPlayersH, nPlayersS,
seed, addr );
if ( gameDead ) {
pushGameDead( addr );
}