mirror of https://github.com/status-im/timbre.git
`get-hostname`: remove unnecessary promise, add max blocking time
This commit is contained in:
parent
2cc45e82bf
commit
160102c5d8
|
@ -250,13 +250,12 @@
|
|||
(def ^:private get-hostname
|
||||
(encore/memoize* 60000
|
||||
(fn []
|
||||
(let [p (promise)]
|
||||
(->
|
||||
(future ; Android doesn't like this on the main thread
|
||||
(deliver p
|
||||
(try (.. java.net.InetAddress getLocalHost getHostName)
|
||||
(catch java.net.UnknownHostException _
|
||||
"UnknownHost"))))
|
||||
@p))))
|
||||
"UnknownHost")))
|
||||
(deref 5000 "UnknownHost")))))
|
||||
|
||||
(defn- wrap-appender-juxt
|
||||
"Wraps compile-time appender juxt with additional runtime capabilities
|
||||
|
|
Loading…
Reference in New Issue