Skip to content

Commit

Permalink
use cons
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryseed committed Jun 15, 2020
1 parent 76c3a79 commit eee4741
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cowboy_telemetry_h.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ init(StreamID, Req, Opts) ->
#{stream_id => StreamID, req => Req}
),
{Commands, Next} = cowboy_stream:init(StreamID, Req, Opts),
{Commands, [Next, StartTime]}.
{Commands, [Next | StartTime]}.

data(StreamID, IsFin, Data, [Next0, StartTime]) ->
data(StreamID, IsFin, Data, [Next0 | StartTime]) ->
{Commands, Next} = cowboy_stream:data(StreamID, IsFin, Data, Next0),
{Commands, [Next, StartTime]}.
{Commands, [Next | StartTime]}.

info(StreamID, Info, [Next0, StartTime]) ->
info(StreamID, Info, [Next0 | StartTime]) ->
EndTime = erlang:monotonic_time(),
case Info of
{response, _, _, _} = Response ->
Expand All @@ -41,9 +41,9 @@ info(StreamID, Info, [Next0, StartTime]) ->
ignore
end,
{Commands, Next} = cowboy_stream:info(StreamID, Info, Next0),
{Commands, [Next, StartTime]}.
{Commands, [Next | StartTime]}.

terminate(StreamID, Reason, [Next, _]) ->
terminate(StreamID, Reason, [Next | _]) ->
cowboy_stream:terminate(StreamID, Reason, Next).

early_error(StreamID, Reason, PartialReq, Resp0, Opts) ->
Expand Down

0 comments on commit eee4741

Please sign in to comment.