What happens if a peer doesn’t respond to "getheaders" or "getdata" on time?

Suppose a node receives the same "inv" message from many peers.

  1. Will the node send "getheaders" requests to all the peers or only one of them?

  2. Does the node keep a timer for getting the "headers" response from the peers? How big
    is the timer?

  3. Suppose the node sends "getheaders" requests to only one of its peers and the timer expires. How many other peers does the node then send "getheaders" requests to? Does the node store a map data structure map<"inv", peer id from which the inv is received> to do this?