try to address one-time assert

and remove it from shipping build
This commit is contained in:
Eric House 2019-03-20 15:07:04 -07:00
parent a7da0e33bb
commit 9374260c59

View file

@ -618,7 +618,12 @@ public class RelayService extends XWJIService
iter.hasNext(); ) { iter.hasNext(); ) {
PacketData packet = iter.next(); PacketData packet = iter.next();
long sentMS = packet.getSentMS(); long sentMS = packet.getSentMS();
Assert.assertTrue( prevSentMS <= sentMS ); if ( prevSentMS > sentMS ) {
Log.e( TAG, "error: prevSentMS: %d > sentMS: %d", prevSentMS, sentMS );
Assert.assertFalse( BuildConfig.DEBUG );
continue;
}
prevSentMS = sentMS; prevSentMS = sentMS;
if ( sentMS > minSentMS ) { if ( sentMS > minSentMS ) {
break; break;
@ -715,8 +720,7 @@ public class RelayService extends XWJIService
udpSocket.send( udpPacket ); udpSocket.send( udpPacket );
sentLen += udpPacket.getLength(); sentLen += udpPacket.getLength();
// Why's this commented out? packet.setSentMS(); // this was commented out. Why?
// packet.setSentMS( nowMS );
breakNow = false; breakNow = false;
} catch ( IOException ex ) { } catch ( IOException ex ) {
Log.e( TAG, "fail sending to %s", udpSocket ); Log.e( TAG, "fail sending to %s", udpSocket );