mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
don't assert in race condition loss
This commit is contained in:
parent
0e0615f5d2
commit
7efd084d35
1 changed files with 13 additions and 12 deletions
|
@ -243,22 +243,23 @@ public class NetStateCache {
|
||||||
mNotifyLater = new Runnable() {
|
mNotifyLater = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Assert.assertTrue( mLastStateSent != s_netAvail );
|
if ( mLastStateSent != s_netAvail ) {
|
||||||
mLastStateSent = s_netAvail;
|
mLastStateSent = s_netAvail;
|
||||||
|
|
||||||
Log.i( TAG, "notifyStateChanged(%b)", s_netAvail );
|
Log.i( TAG, "notifyStateChanged(%b)", s_netAvail );
|
||||||
|
|
||||||
synchronized( s_ifs ) {
|
synchronized( s_ifs ) {
|
||||||
Iterator<StateChangedIf> iter = s_ifs.iterator();
|
Iterator<StateChangedIf> iter = s_ifs.iterator();
|
||||||
while ( iter.hasNext() ) {
|
while ( iter.hasNext() ) {
|
||||||
iter.next().onNetAvail( s_netAvail );
|
iter.next().onNetAvail( s_netAvail );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( s_netAvail ) {
|
if ( s_netAvail ) {
|
||||||
CommsConnType typ = CommsConnType
|
CommsConnType typ = CommsConnType
|
||||||
.COMMS_CONN_RELAY;
|
.COMMS_CONN_RELAY;
|
||||||
GameUtils.resendAllIf( context, typ );
|
GameUtils.resendAllIf( context, typ );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue