inaka/apns4erl

apns:close_connection don't closed h2_connect

Closed this issue · 2 comments

handle_cast(stop, State) ->

i modify apns_connect.erl and fixed this issues.

handle_cast(stop,  #{http2_connection := HTTP2Conn} = State) ->
   h2_client:stop(HTTP2Conn),
   {stop, normal, State};

by the way , i use chatterbox 0.7.0 ,and it replace gen_fsm to gen_statem

Hi @boboxiaodd , thanks for the fix. Could you please raise a PR with your fix?

sorry @ferigis i don't know how to do it.
i use apns:close_connection every 10min ,and use apns:connect a new h2_connect
to solve chatterbox's memory leak