aboutsummaryrefslogtreecommitdiffstats
path: root/examples/eventsource/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/eventsource/src')
-rw-r--r--examples/eventsource/src/eventsource_handler.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/eventsource/src/eventsource_handler.erl b/examples/eventsource/src/eventsource_handler.erl
index 661057c..a184807 100644
--- a/examples/eventsource/src/eventsource_handler.erl
+++ b/examples/eventsource/src/eventsource_handler.erl
@@ -9,12 +9,12 @@
init(_Transport, Req, []) ->
Headers = [{<<"content-type">>, <<"text/event-stream">>}],
- {ok, Req2} = cowboy_req:chunked_reply(200, Headers, Req),
+ Req2 = cowboy_req:chunked_reply(200, Headers, Req),
erlang:send_after(1000, self(), {message, "Tick"}),
{loop, Req2, undefined, 5000}.
info({message, Msg}, Req, State) ->
- ok = cowboy_req:chunk(["id: ", id(), "\ndata: ", Msg, "\n\n"], Req),
+ cowboy_req:chunk(["id: ", id(), "\ndata: ", Msg, "\n\n"], Req),
erlang:send_after(1000, self(), {message, "Tick"}),
{loop, Req, State}.