Use Connection.get_heartbeat_interval()