mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 04:10:24 +00:00
fixup! Add hibernate option to cowboy_http and cowboy_http2
This commit is contained in:
parent
ab8aeb424e
commit
9beb498858
2 changed files with 4 additions and 0 deletions
|
@ -230,6 +230,8 @@ before_loop(State=#state{opts=#{hibernate := true}}) ->
|
|||
before_loop(State) ->
|
||||
loop(State).
|
||||
|
||||
-spec loop(#state{}) -> ok.
|
||||
|
||||
loop(State=#state{parent=Parent, socket=Socket, transport=Transport, opts=Opts,
|
||||
buffer=Buffer, timer=TimerRef, children=Children, in_streamid=InStreamID,
|
||||
last_streamid=LastStreamID}) ->
|
||||
|
|
|
@ -274,6 +274,8 @@ before_loop(State=#state{opts=#{hibernate := true}}, Buffer) ->
|
|||
before_loop(State, Buffer) ->
|
||||
loop(State, Buffer).
|
||||
|
||||
-spec loop(#state{}, binary()) -> ok.
|
||||
|
||||
loop(State=#state{parent=Parent, socket=Socket, transport=Transport,
|
||||
opts=Opts, timer=TimerRef, children=Children}, Buffer) ->
|
||||
Messages = Transport:messages(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue