<commit_before>// RPC client
var RPC = (function (rpc) {
    var counter = 0;
    var serverChannels = {};
    var clientChannels = {};
    var deferreds = {};
    var baseURL;
    var rpcMaster;
    var _loadChannel = function (name, handshakeData) {
        rpcMaster.emit('load channel', {name: name, handshake: handshakeData});
        if (!serverChannels.hasOwnProperty(name)) {
            serverChannels[name] = {};
        }
        var channel = serverChannels[name];
        channel._loadDef = channel._loadDef || Q.defer();
        channel._socket = io.connect(baseURL + '/rpc-' + name, handshakeData)
            .on('return', function (data) {
                deferreds[data.toId].resolve(data.value);
            })
            .on('error', function (data) {
                deferreds[data.toId].reject(data.reason);
            })
            .on('connect_failed', function (reason) {
                console.error('unable to connect to namespace ', reason);
                channel._loadDef.reject(reason);
            });
        return channel._loadDef.promise;
    };<commit_msg>authentication can now be tried more than once<commit_after>// RPC client
var RPC = (function (rpc) {
    var counter = 0;
    var serverChannels = {};
    var clientChannels = {};
    var deferreds = {};
    var baseURL;
    var rpcMaster;
    var _loadChannel = function (name, handshakeData) {
        rpcMaster.emit('load channel', {name: name, handshake: handshakeData});
        if (!serverChannels.hasOwnProperty(name)) {
            serverChannels[name] = {};
        }
        var channel = serverChannels[name];
        channel._loadDef = Q.defer();
        channel._socket = io.connect(baseURL + '/rpc-' + name, handshakeData)
            .on('return', function (data) {
                deferreds[data.toId].resolve(data.value);
            })
            .on('error', function (data) {
                deferreds[data.toId].reject(data.reason);
            })
            .on('connect_failed', function (reason) {
                console.error('unable to connect to namespace ', reason);
                channel._loadDef.reject(reason);
            });
        return channel._loadDef.promise;
    };
{'fraction_non_alphanumeric': 0.1308284291534631, 'fraction_numerical': 0.0009053870529651426, 'mean_word_length': 2.099579242636746, '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': '5289531', 'n_tokens_mistral': 624, 'n_tokens_neox': 609, 'n_words': 136}