<commit_before>module.exports = function(pc, candidates, callback) {
  var timer;

  pc.onicecandidate = function(evt) {
    if (evt.candidate) {
      console.log(evt);
      candidates.push(evt.candidate);
    }
    else {
      // TODO: trigger callback when supported
    }
  };

  timer = setInterval(function() {
    if (pc.iceGatheringState === 'complete') {
      // release the event handler reference
      pc.onicecandidate = null;
      clearInterval(timer);
      callback();
    }
  }, 100);
};<commit_msg>Remove the timer for monitoring the icegatheringstate<commit_after>module.exports = function(pc, candidates, callback) {
  pc.onicecandidate = function(evt) {
    if (evt.candidate) {
      console.log(evt);
      candidates.push(evt.candidate);
    }
    else {
      callback();
    }
  };
};
{'fraction_non_alphanumeric': 0.13144963144963145, 'fraction_numerical': 0.0036855036855036856, 'mean_word_length': 2.8262910798122065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5982593', 'n_tokens_mistral': 255, 'n_tokens_neox': 258, 'n_words': 51}