Skip to content

Commit

Permalink
Experiment with a fix for #617
Browse files Browse the repository at this point in the history
  • Loading branch information
aphyr committed Oct 21, 2015
1 parent 48e9f61 commit 0bcd019
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/riemann/transport/sse.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[riemann.time :refer [unix-time]]
[clojure.tools.logging :refer [info]]
[clj-http.util :refer [url-decode]]
[clojure.string :refer [split]]))
[clojure.string :refer [split]])
(:import sun.nio.ch.IOUtil))

(def event-to-server-sent-event
"Prepare an event for sending out on the wire."
Expand Down Expand Up @@ -134,7 +135,7 @@
(:latencies in)))))))

(defn sse-server
"Starts a new SSE server for a core. Starts immediately.
"Creates a new SSE server for a core.
Options:
:host The address to listen on (default 127.0.0.1)
Expand All @@ -152,6 +153,10 @@
:or {host "127.0.0.1"
port 5558
headers {}}}]

; Work around a deadlock when SSE-server and netty are started in parallel
(IOUtil/load)

(SSEServer.
host
port
Expand Down

0 comments on commit 0bcd019

Please sign in to comment.