aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_sse.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun_sse.erl')
-rw-r--r--src/gun_sse.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gun_sse.erl b/src/gun_sse.erl
index 4fe7419..835a7a8 100644
--- a/src/gun_sse.erl
+++ b/src/gun_sse.erl
@@ -45,5 +45,11 @@ handle(IsFin, Data, State=#state{reply_to=ReplyTo, stream_ref=StreamRef, sse_sta
ReplyTo ! {gun_sse, self(), StreamRef, Event},
handle(IsFin, <<>>, State#state{sse_state=SSE});
{more, SSE} ->
+ case IsFin of
+ fin ->
+ ReplyTo ! {gun_sse, self(), StreamRef, fin};
+ _ ->
+ ok
+ end,
{done, State#state{sse_state=SSE}}
end.