diff options
author | Loïc Hoguin <[email protected]> | 2017-10-31 15:04:00 +0000 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-10-31 15:04:00 +0000 |
commit | a97640d56dcb1a32ea44cb3be6575d2a4d6136c9 (patch) | |
tree | f80a72668727e850beaab14c46e935e4df247bd3 /src/cowboy_http.erl | |
parent | 217fac7f4414f5ff5eda85079a179e2462aba61c (diff) | |
download | cowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.tar.gz cowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.tar.bz2 cowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.zip |
Add informational responses to metrics
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r-- | src/cowboy_http.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index f6d064e..7d19c05 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -908,9 +908,9 @@ commands(State0=#state{ref=Ref, parent=Parent, socket=Socket, transport=Transpor [{switch_protocol, Headers, Protocol, InitialState}|_Tail]) -> %% @todo This should be the last stream running otherwise we need to wait before switching. %% @todo If there's streams opened after this one, fail instead of 101. - State = cancel_timeout(State0), + State1 = cancel_timeout(State0), %% Send a 101 response, then terminate the stream. - State = #state{streams=Streams} = commands(State, StreamID, [{inform, 101, Headers}]), + State = #state{streams=Streams} = info(State1, StreamID, {inform, 101, Headers}), #stream{state=StreamState} = lists:keyfind(StreamID, #stream.id, Streams), %% @todo We need to shutdown processes here first. stream_call_terminate(StreamID, switch_protocol, StreamState), |