anchor.diff:              #connection{pings = Pings}=Conn)
       when H#frame_header.type == ?PING,
            ?IS_FLAG((H#frame_header.flags), ?FLAG_ACK) ->
  -    case maps:get(Payload, Pings, undefined) of
  +    case maps:get(h2_frame_ping:to_binary(Payload), Pings, undefined) of
           undefined ->
               lager:debug("[~p] Received unknown PING ACK",
                           [Conn#connection.type]);
  
positive.code:              #connection{} = Conn) ->
      socksend(Conn, Binary),
      {next_state, StateName, Conn};
  handle_event({send_ping, NotifyPid}, StateName,
               #connection{pings = Pings} = Conn) ->
      PingValue = crypto:strong_rand_bytes(8),
      Frame = h2_frame_ping:new(PingValue),
      Headers = #frame_header{stream_id = 0, flags = 16#0},
      Binary = h2_frame:to_binary({Headers, Frame}),
      socksend(Conn, Binary),
  
      NextPings = maps:put(PingValue, {NotifyPid, erlang:monotonic_time(milli_seconds)}, Pings),
      NextConn = Conn#connection{pings = NextPings},
      {next_state, StateName, NextConn};
  handle_event({send_frame, Frame}, StateName,
               #connection{} =Conn) ->
      Binary = h2_frame:to_binary(Frame),
  
negative.code:         {error, Code} ->
              {reply, {error, Code}, StateName, Conn}
      end;
  handle_sync_event({send_ping, NotifyPid}, _F,
          StateName,
          #connection{pings = Pings} = Conn) ->
      PingValue = crypto:strong_rand_bytes(8),
      Frame = h2_frame_ping:new(PingValue),
      Headers = #frame_header{stream_id = 0, flags = 16#0},
      Binary = h2_frame:to_binary({Headers, Frame}),
  
      case socksend(Conn, Binary) of
          ok ->
              NextPings = maps:put(PingValue, {NotifyPid, erlang:monotonic_time(milli_seconds)}, Pings),
              NextConn = Conn#connection{pings = NextPings},
              {reply, ok, StateName, NextConn};
          {error, _Reason} = Err ->
              {reply, Err, StateName, Conn}
      end;
  handle_sync_event(_E, _F, StateName,
                    #connection{}=Conn) ->
      {next_state, StateName, Conn}.
  