diff options
author | Loïc Hoguin <[email protected]> | 2012-02-20 09:31:22 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-02-20 09:31:22 +0100 |
commit | db382d4d392930c9b4e9789605afda51fa710d42 (patch) | |
tree | 6f5b255b99b16c9c3a62948124d5e176fe409c21 /src/cowboy_acceptor.erl | |
parent | 811d11a1a28e9d044cb328d62e3c01bb3c536fb5 (diff) | |
download | cowboy-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.erl | 2 |
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? |