Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reenable update

  • Loading branch information...
commit 65cbccf0f77b3a0f803f05c0f5eb78a6d566e828 1 parent 9feb9be
@dalkvist authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/bf3/bl.clj
View
18 src/bf3/bl.clj
@@ -235,14 +235,13 @@
(defn save-live-users
([] (save-live-users (time/now)))
([start]
- ;; (when (> 60 (time/in-secs (time/interval start (time/now))))
- ;; (doseq [[server id] server-ids]
- ;; (let [info (get-users id)]
- ;; (when (not-empty info) (save-bl-user! info))))
- ;; (when (> 45 (time/in-secs (time/interval start (time/now))))
- ;; (future (Thread/sleep 10000)
- ;; (save-live-users start))))
- ))
+ (when (> 60 (time/in-secs (time/interval start (time/now))))
+ (doseq [[server id] server-ids]
+ (let [info (get-users id)]
+ (when (not-empty info) (save-bl-user! info))))
+ (when (> 45 (time/in-secs (time/interval start (time/now))))
+ (future (Thread/sleep 5000)
+ (save-live-users start))))))
(defn- get-platoon-info [id]
(-> (client/get (str "http://battlelog.battlefield.com/bf3/platoon/" id "/listmembers/")
@@ -287,7 +286,8 @@
(.close socket)
info)
(catch Exception ex
- (when (and (not (nil? (re-find #"Address already in use" (.getMessage ex))))
+ (when (and (and(not-empty (.getMessage ex))
+ (not (nil? (re-find #"Address already in use" (.getMessage ex)))))
(< (- dest-port default-dest-port) 50))
(live-info server-ip server-port game-id (int (+ (rand 25) dest-port)))))))
([server-ip server-port game-id dest-port socket]
Please sign in to comment.
Something went wrong with that request. Please try again.