<commit_before>"use strict";
require("../efront/setupenv");
var memery = require("../efront/memery");
var clients = require("./clients");
var message = require("../message");
require("../efront/quitme");
process.on("uncaughtException", process.exit);
process.on("unhandledRejection", process.exit);
var { HTTPS_PORT, HTTP_PORT } = memery;
HTTP_PORT = +HTTP_PORT || 0;
HTTPS_PORT = +HTTPS_PORT || 0;
var reload = require("./liveload");
var closeListener = function () {
    if (!portedServersList.filter(s => s && s.listening).length) {
        process.removeAllListeners();
        require("../efront/watch").close();
        safeQuitProcess();
    }
};
var safeQuitProcess = function () {
    portedServersList.forEach((server) => {
        server.removeAllListeners();
        server.close(closeListener);
    });
    reload.splice(0, reload.length).forEach(res => res.end(''));
    process.removeAllListeners();
    clients.destroy();
    process.stdin.unref();
    process.stdout.unref();<commit_msg>解决端口开启失败后没有主动退出的问题<commit_after>"use strict";
require("../efront/setupenv");
var memery = require("../efront/memery");
var clients = require("./clients");
var message = require("../message");
require("../efront/quitme");
process.on("uncaughtException", process.exit);
process.on("unhandledRejection", process.exit);
var { HTTPS_PORT, HTTP_PORT } = memery;
HTTP_PORT = +HTTP_PORT || 0;
HTTPS_PORT = +HTTPS_PORT || 0;
var reload = require("./liveload");
var closeListener = function () {
    if (!portedServersList.filter(s => s && s.listening).length) {
        process.removeAllListeners();
        require("../efront/watch").close();
        safeQuitProcess();
    }
};
var safeQuitProcess = function () {
    portedServersList.forEach((server) => {
        server.removeAllListeners();
        server.close(function(){});
    });
    reload.splice(0, reload.length).forEach(res => res.end(''));
    process.removeAllListeners();
    clients.destroy();
    process.stdin.unref();
    process.stdout.unref();
{'fraction_non_alphanumeric': 0.18588469184890655, 'fraction_numerical': 0.002982107355864811, 'mean_word_length': 4.045112781954887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '619909', 'n_tokens_mistral': 654, 'n_tokens_neox': 644, 'n_words': 105}