author | unC0Rr |
Fri, 17 Jan 2014 16:29:11 +0100 | |
changeset 10005 | 800d1bd9021a |
parent 10004 | eb0b520564bb |
child 10006 | 921e7b71330f |
--- a/gameServer/JoinsMonitor.hs Fri Jan 17 16:31:36 2014 +0100 +++ b/gameServer/JoinsMonitor.hs Fri Jan 17 16:29:11 2014 +0100 @@ -24,7 +24,7 @@ cleanup :: JoinsMonitor -> UTCTime -> IO () -cleanup (JoinsMonitor ref) time = modifyIORef' ref f +cleanup (JoinsMonitor ref) time = modifyIORef ref f where f = Map.mapMaybe (\v -> let v' = takeWhile (\t -> diffUTCTime time t < 60*60) v in if null v' then Nothing else Just v')