mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Fix another warning
This commit is contained in:
parent
ad9ab51648
commit
774824cd0f
1 changed files with 2 additions and 2 deletions
|
@ -908,9 +908,9 @@ commands(State0=#state{ref=Ref, parent=Parent, socket=Socket, transport=Transpor
|
||||||
[{switch_protocol, Headers, Protocol, InitialState}|_Tail]) ->
|
[{switch_protocol, Headers, Protocol, InitialState}|_Tail]) ->
|
||||||
%% @todo This should be the last stream running otherwise we need to wait before switching.
|
%% @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.
|
%% @todo If there's streams opened after this one, fail instead of 101.
|
||||||
State1 = cancel_timeout(State0),
|
State = cancel_timeout(State0),
|
||||||
%% Send a 101 response, then terminate the stream.
|
%% Send a 101 response, then terminate the stream.
|
||||||
State = #state{streams=Streams} = info(State1, StreamID, {inform, 101, Headers}),
|
#state{streams=Streams} = info(State, StreamID, {inform, 101, Headers}),
|
||||||
#stream{state=StreamState} = lists:keyfind(StreamID, #stream.id, Streams),
|
#stream{state=StreamState} = lists:keyfind(StreamID, #stream.id, Streams),
|
||||||
%% @todo We need to shutdown processes here first.
|
%% @todo We need to shutdown processes here first.
|
||||||
stream_call_terminate(StreamID, switch_protocol, StreamState),
|
stream_call_terminate(StreamID, switch_protocol, StreamState),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue