<commit_before>'use strict'
var write = require('../write')

function handlePing (client, packet, done) {
  client.broker.emit('ping', packet, client)
  write(client, {
    cmd: 'pingresp'
  }, done)
  done()
}

module.exports = handlePing<commit_msg>Fixed duplicated done call in ping handler (#326)<commit_after>'use strict'

var write = require('../write')
var pingResp = {
  cmd: 'pingresp'
}

function handlePing (client, packet, done) {
  client.broker.emit('ping', packet, client)
  write(client, pingResp, done)
}

module.exports = handlePing
{'fraction_non_alphanumeric': 0.14909090909090908, 'fraction_numerical': 0.005454545454545455, 'mean_word_length': 4.739583333333333, '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': '6677648', 'n_tokens_mistral': 191, 'n_tokens_neox': 180, 'n_words': 48}