From 84ab24fa53307ebaa6328dd4431ef2049bb1670e Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sun, 22 Sep 2019 13:48:57 +0100 Subject: [PATCH] lib: drop support for messages without timestamps All our tooling does the right thing, and this was always janky --- .../ctfwstimer/lib/CtFwSGameStateManager.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java b/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java index 7c3876c..0049391 100644 --- a/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java +++ b/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java @@ -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) { -- 2.50.1