aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_acceptor.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-02-20 09:31:22 +0100
committerLoïc Hoguin <[email protected]>2012-02-20 09:31:22 +0100
commitdb382d4d392930c9b4e9789605afda51fa710d42 (patch)
tree6f5b255b99b16c9c3a62948124d5e176fe409c21 /src/cowboy_acceptor.erl
parent811d11a1a28e9d044cb328d62e3c01bb3c536fb5 (diff)
downloadcowboy-db382d4d392930c9b4e9789605afda51fa710d42.tar.gz
cowboy-db382d4d392930c9b4e9789605afda51fa710d42.tar.bz2
cowboy-db382d4d392930c9b4e9789605afda51fa710d42.zip
Check for upgrades on accept timeout
Otherwise acceptors will not be upgraded properly until after the next request comes in. Thanks to DeadZen for pointing it out.
Diffstat (limited to 'src/cowboy_acceptor.erl')
-rw-r--r--src/cowboy_acceptor.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_acceptor.erl b/src/cowboy_acceptor.erl
index 29f7c09..b2a1ef0 100644
--- a/src/cowboy_acceptor.erl
+++ b/src/cowboy_acceptor.erl
@@ -41,7 +41,7 @@ acceptor(LSocket, Transport, Protocol, Opts, OptsVsn, ListenerPid, ReqsSup) ->
cowboy_listener:add_connection(ListenerPid,
default, Pid, OptsVsn);
{error, timeout} ->
- ok;
+ cowboy_listener:check_upgrades(ListenerPid, OptsVsn);
{error, _Reason} ->
%% @todo Probably do something here. If the socket was closed,
%% we may want to try and listen again on the port?