]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
lib: drop support for messages without timestamps
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 22 Sep 2019 12:48:57 +0000 (13:48 +0100)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 22 Sep 2019 14:35:53 +0000 (15:35 +0100)
All our tooling does the right thing, and this was always janky

lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java

index 7c3876cab1993b92e48707e8669fd07335e162c6..0049391c652cd816e8a34bbc064dc575137683ae 100644 (file)
@@ -272,17 +272,12 @@ public class CtFwSGameStateManager {
 
         try {
             t = s.nextLong();
-        } catch (NoSuchElementException nse) {
-            // Maybe they forgot a time stamp?  Fake one up, a second ago or so,
-            // to allow for some clock drift and another message with a timestamp.
-            synchronized (this) {
-                m = new Msg(mT.wallMS() - 1000, str);
-            }
-        }
-
-        if (m == null) {
             s.useDelimiter("\\z");
             m = new Msg(t, s.next().trim());
+        } catch (NoSuchElementException nse) {
+            // malformed message; shouldn't be a problem these days (while we used to
+            // make up a timestamp for the entire string as the message, our tooling
+            // always sends with timestamps now).
         }
 
         synchronized (this) {