diff --git a/rebar.config b/rebar.config index 58a2d43..46d11b1 100644 --- a/rebar.config +++ b/rebar.config @@ -23,7 +23,7 @@ %% == Dependencies == {deps, [ - {gun, "1.3.3"}, + {gun, "2.0.0-rc.1"}, {jsx, "3.0.0"}, {base64url, "1.0.1"} ]}. diff --git a/src/apns_connection.erl b/src/apns_connection.erl index 6441889..2b00461 100644 --- a/src/apns_connection.erl +++ b/src/apns_connection.erl @@ -231,7 +231,9 @@ open_origin(internal, _, #{connection := Connection} = StateData) -> {next_event, internal, { Host , Port , #{ protocols => [http2] - , transport_opts => TransportOpts + , tls_opts => TransportOpts + , http_opts => #{keepalive => 5000} + , http2_opts => #{keepalive => 5000} , retry => 0 }}}}. @@ -244,6 +246,8 @@ open_proxy(internal, _, StateData) -> , ProxyPort , #{ protocols => [http] , transport => tcp + , http_opts => #{keepalive => infinity} + , http2_opts => #{keepalive => infinity} , retry => 0 }}}}.