mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Add cowboy:accept_ack/1 for a cleaner handling of the shoot message
This commit is contained in:
parent
874cdd3bda
commit
e550ba7cd3
5 changed files with 19 additions and 9 deletions
|
@ -77,7 +77,7 @@ init(ListenerPid, Socket, Transport, Opts) ->
|
|||
Timeout = proplists:get_value(timeout, Opts, 5000),
|
||||
URLDecDefault = {fun cowboy_http:urldecode/2, crash},
|
||||
URLDec = proplists:get_value(urldecode, Opts, URLDecDefault),
|
||||
receive shoot -> ok end,
|
||||
ok = cowboy:accept_ack(ListenerPid),
|
||||
wait_request(#state{listener=ListenerPid, socket=Socket, transport=Transport,
|
||||
dispatch=Dispatch, max_empty_lines=MaxEmptyLines,
|
||||
max_line_length=MaxLineLength, timeout=Timeout, urldecode=URLDec}).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue