0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix specs and a weird value in cowboy_spdy

This commit is contained in:
Loïc Hoguin 2014-06-10 09:24:06 +02:00
parent fc7e038fba
commit 7cd3ecc6b6

View file

@ -148,7 +148,7 @@ loop(State=#state{parent=Parent, socket=Socket, transport=Transport,
Child = #child{is_recv={passive, FromSocket, FromPid, _, _}} Child = #child{is_recv={passive, FromSocket, FromPid, _, _}}
= get_child(StreamID, State), = get_child(StreamID, State),
FromPid ! {recv, FromSocket, {error, timeout}}, FromPid ! {recv, FromSocket, {error, timeout}},
loop(replace_child(Child#child{is_recv=passive}, State)); loop(replace_child(Child, State));
{reply, {Pid, StreamID}, Status, Headers} {reply, {Pid, StreamID}, Status, Headers}
when Pid =:= self() -> when Pid =:= self() ->
Child = #child{output=nofin} = get_child(StreamID, State), Child = #child{output=nofin} = get_child(StreamID, State),
@ -489,7 +489,7 @@ sendfile(Socket = {Pid, _}, Filepath) ->
_ = Pid ! {sendfile, Socket, Filepath}, _ = Pid ! {sendfile, Socket, Filepath},
{ok, undefined}. {ok, undefined}.
-spec setopts(inet:socket(), list()) -> ok. -spec setopts({pid(), _}, list()) -> ok.
setopts(Socket = {Pid, _}, [{active, once}]) -> setopts(Socket = {Pid, _}, [{active, once}]) ->
_ = Pid ! {active, Socket, self()}, _ = Pid ! {active, Socket, self()},
ok; ok;