File gun-2.1.0-map_get.patch of Package gun

diff -Ndurp gun-2.1.0/src/gun_http2.erl gun-2.1.0-map_get/src/gun_http2.erl
--- gun-2.1.0/src/gun_http2.erl	2024-03-14 16:52:00.000000000 +0200
+++ gun-2.1.0-map_get/src/gun_http2.erl	2024-11-26 21:12:40.168081080 +0200
@@ -920,8 +920,9 @@ close_stream(State, #stream{ref=StreamRe
 	ReplyTo ! {gun_error, self(), stream_ref(State, StreamRef), Reason},
 	ok.
 
-keepalive(State=#http2_state{pings_unack=PingsUnack, opts=Opts}, _, EvHandlerState)
-		when PingsUnack >= map_get(keepalive_tolerance, Opts) ->
+keepalive(State=#http2_state{pings_unack=PingsUnack, opts=#{keepalive_tolerance := KeepaliveTolerance}},
+		_, EvHandlerState)
+		when PingsUnack >= KeepaliveTolerance ->
 	{connection_error(State, {connection_error, no_error,
 		'The number of unacknowledged pings exceed the configured tolerance value.'}),
 		EvHandlerState};
openSUSE Build Service is sponsored by