aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Server/Ingest.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Server/Ingest.hs b/lib/Server/Ingest.hs
index 6a8383f..959a4c6 100644
--- a/lib/Server/Ingest.hs
+++ b/lib/Server/Ingest.hs
@@ -87,18 +87,18 @@ handleTrainPing dbpool subscribers cfg onError ping@SentPing{..} =
Nothing -> onError >> pure Nothing
Just tracker@Tracker{..} -> do
- unless (serverConfigDebugMode cfg) $ do
- now <- liftIO getCurrentTime
- let timeDiff = sentPingTimestamp `diffUTCTime` now
- when (utctDay sentPingTimestamp /= utctDay now) $ do
- logErrorN "received ping for wrong day"
- throw err400
- when (timeDiff < 10) $ do
- logWarnN "received ping more than 10 seconds out of date"
- throw err400
- when (timeDiff > 10) $ do
- logWarnN "received ping from more than 10 seconds in the future"
- throw err400
+ -- unless (serverConfigDebugMode cfg) $ do
+ -- now <- liftIO getCurrentTime
+ -- let timeDiff = sentPingTimestamp `diffUTCTime` now
+ -- when (utctDay sentPingTimestamp /= utctDay now) $ do
+ -- logErrorN "received ping for wrong day"
+ -- throw err400
+ -- when (timeDiff < 10) $ do
+ -- logWarnN "received ping more than 10 seconds out of date"
+ -- throw err400
+ -- when (timeDiff > 10) $ do
+ -- logWarnN "received ping from more than 10 seconds in the future"
+ -- throw err400
ticketId <- case trackerCurrentTicket of
Just ticketId -> pure ticketId