fix failure to notify relay of half-game deletion

Wasn't detecting as a relay game something registered on relay but not
yet joined by another device, a common case!
This commit is contained in:
Eric House 2017-11-11 08:10:48 -08:00
parent acf668ae8a
commit 31123b72ce

View file

@ -1196,7 +1196,7 @@ public class GameUtils {
for ( CommsConnType typ : conTypes ) {
switch ( typ ) {
case COMMS_CONN_RELAY:
tellRelayDied( context, summary, informNow );
// see below
break;
case COMMS_CONN_BT:
BTService.gameDied( context, addr.bt_btAddr, gameID );
@ -1210,6 +1210,14 @@ public class GameUtils {
}
}
}
// comms doesn't have a relay address for us until the game's
// in play (all devices registered, at least.) To enable
// deleting on relay half-games that we created but nobody
// joined, special-case this one.
if ( summary.inRelayGame() ) {
tellRelayDied( context, summary, informNow );
}
gamePtr.release();
}