<commit_before>"use strict";
var EventDispatcher     = require('appolo').EventDispatcher,
    net                 = require('net');

module.exports = EventDispatcher.define({

    $config: {
        id: 'unixSocket',
        singleton: false,
        inject: ['env', 'utils', 'mainLoggers'],
        initMethod: 'initialize'
    },

    constructor: function(socket) {

        this.id = null;

        this._isRunning = false;

        this._path = socket.file || '';

        this._chmod = socket.chmod || '0700';

        this._processOriginalChmod = process.umask();

        this._server = null;
    },

    initialize: function() {

        this.id = this.utils.guid();

        this._start();

    },

    dispose: function() {

        if(this._server && this._isRunning) {

            this._server.close();

            this._isRunning = false;
<commit_msg>disable listening to unix socket when file not specified<commit_after>"use strict";
var EventDispatcher     = require('appolo').EventDispatcher,
    net                 = require('net');

module.exports = EventDispatcher.define({

    $config: {
        id: 'unixSocket',
        singleton: false,
        inject: ['env', 'utils', 'mainLoggers'],
        initMethod: 'initialize'
    },

    constructor: function(socket) {

        this.id = null;

        this._isRunning = false;

        this._path = socket.file || '';

        this._chmod = socket.chmod || '0700';

        this._processOriginalChmod = process.umask();

        this._server = null;
    },

    initialize: function() {

        this.id = this.utils.guid();

        if(this._path) {
            this._start();
        }

    },

    dispose: function() {

        if(this._server && this._isRunning) {

            this._server.close();

            this._isRunning = false;

{'fraction_non_alphanumeric': 0.138215859030837, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 1.9835796387520526, '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': '4978994', 'n_tokens_mistral': 542, 'n_tokens_neox': 499, 'n_words': 103}