<commit_before>const FIRST_UPDATE=1000,
      DNS_REFRESH_TIME=6000; // 60sec

var events = require('events'),
    moment = require('moment'),
    url = require('url'),
    querystring = require('querystring'),
    util = require('util'),
    dns  = require('dns'),
    debug = require('debug')('server'),
    debugSend = require('debug')('server:send'),
    debugDNS = require('debug')('server:dns');

function Server(programConfig) {
    this.programConfig = programConfig;
    this.clientList = [];
    this.isHTTPS = programConfig.ssl;
    this.useEndPointUrl = programConfig.useendpointurl;

    this.http = (programConfig.ssl) ? require('https') : require('http');
    this.http.localAgent = new this.http.Agent({rejectUnauthorized: false});

    this.minUpdateTime = programConfig.minupdatetime;
    this.maxUpdateTime = programConfig.maxupdatetime;
    this.waitTimeout = programConfig.timeout;

    this.timeout = null;

    this.sendTimeout = null;
    this.semRequest = (this.isHTTPS) ? 100: 25;   // controls max number of requests we have in flight
    this.requestQueue = []; // list of endpoints that should get an update<commit_msg>more sane DNS resolution time<commit_after>const FIRST_UPDATE=1000,
      DNS_REFRESH_TIME=30000; // 60sec

var events = require('events'),
    moment = require('moment'),
    url = require('url'),
    querystring = require('querystring'),
    util = require('util'),
    dns  = require('dns'),
    debug = require('debug')('server'),
    debugSend = require('debug')('server:send'),
    debugDNS = require('debug')('server:dns');

function Server(programConfig) {
    this.programConfig = programConfig;
    this.clientList = [];
    this.isHTTPS = programConfig.ssl;
    this.useEndPointUrl = programConfig.useendpointurl;

    this.http = (programConfig.ssl) ? require('https') : require('http');
    this.http.localAgent = new this.http.Agent({rejectUnauthorized: false});

    this.minUpdateTime = programConfig.minupdatetime;
    this.maxUpdateTime = programConfig.maxupdatetime;
    this.waitTimeout = programConfig.timeout;

    this.timeout = null;

    this.sendTimeout = null;
    this.semRequest = (this.isHTTPS) ? 100: 25;   // controls max number of requests we have in flight
    this.requestQueue = []; // list of endpoints that should get an update
{'fraction_non_alphanumeric': 0.13661910938175528, 'fraction_numerical': 0.01340250756593169, 'mean_word_length': 3.9763440860215056, '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': '2793200', 'n_tokens_mistral': 716, 'n_tokens_neox': 669, 'n_words': 147}