mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
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:
parent
59285aa9f4
commit
f06e7bdd98
1 changed files with 4 additions and 5 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue