First thing, we should do heartbeat every heartbeat timeout rather than (hearbeatTime + transfere time).
Second, if the package is lost we prob dont want to wait tcp to timeout.

It does not matter to send two same request to the peer.