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

Allow code reloading inside the cowboy_http_protocol module during keep-alive.

This commit is contained in:
Loïc Hoguin 2011-03-20 14:24:43 +01:00
parent c4d4b6a051
commit df35916d2a

View file

@ -14,7 +14,7 @@
-module(cowboy_http_protocol). -module(cowboy_http_protocol).
-export([start_link/3]). %% API. -export([start_link/3]). %% API.
-export([init/3]). %% FSM. -export([init/3, wait_request/1]). %% FSM.
-include("include/types.hrl"). -include("include/types.hrl").
-include("include/http.hrl"). -include("include/http.hrl").
@ -177,7 +177,7 @@ terminate(#state{socket=Socket, transport=Transport}) ->
-spec next_request(State::#state{}) -> ok. -spec next_request(State::#state{}) -> ok.
next_request(State=#state{connection=keepalive}) -> next_request(State=#state{connection=keepalive}) ->
wait_request(State); ?MODULE:wait_request(State);
next_request(State=#state{connection=close}) -> next_request(State=#state{connection=close}) ->
terminate(State). terminate(State).