<commit_before>import PricingService from './pricing-service';
import ReferenceService from './reference-service';
import BlotterService from './blotter-service';
import ExecutionService from './execution-service';
import AnalyticsService from './analytics-service';

import transport from './transport';
import emitter from '../utils/emitter';
import utils from '../utils';

const DISCONNECT_SESSION_AFTER = 1000 * 60 * 15;

/**
 * @class ReactiveTrader
 * @singleton
 */
@utils.mixin(emitter)
class ReactiveTrader {

  /**
   * @constructs ReactiveTrader
   * @param {transport} transport
   */
  constructor(transport){
    transport.isConnected || transport.open();
    this.pricing = new PricingService(transport);
    this.reference = new ReferenceService(transport);
    this.blotter = new BlotterService(transport);
    this.execution = new ExecutionService(transport);
    this.analytics = new AnalyticsService(transport);

    this.transport = transport;

    this.transport
      .on('timeout', () => this.trigger('timeout'))
      .on('open', () =>{
        this.sessionDisconnectTimer = setTimeout(() =>{
          this.trigger('timeout');
          this.transport.close();
          this.transport.markEverythingAsDead();
        }, 5000);
      });
  }

}

export default new ReactiveTrader(transport);<commit_msg>oups, wrong timeout for disconnect<commit_after>import PricingService from './pricing-service';
import ReferenceService from './reference-service';
import BlotterService from './blotter-service';
import ExecutionService from './execution-service';
import AnalyticsService from './analytics-service';

import transport from './transport';
import emitter from '../utils/emitter';
import utils from '../utils';

const DISCONNECT_SESSION_AFTER = 1000 * 60 * 15;

/**
 * @class ReactiveTrader
 * @singleton
 */
@utils.mixin(emitter)
class ReactiveTrader {

  /**
   * @constructs ReactiveTrader
   * @param {transport} transport
   */
  constructor(transport){
    transport.isConnected || transport.open();
    this.pricing = new PricingService(transport);
    this.reference = new ReferenceService(transport);
    this.blotter = new BlotterService(transport);
    this.execution = new ExecutionService(transport);
    this.analytics = new AnalyticsService(transport);

    this.transport = transport;

    this.transport
      .on('timeout', () => this.trigger('timeout'))
      .on('open', () =>{
        this.sessionDisconnectTimer = setTimeout(() =>{
          this.trigger('timeout');
          this.transport.close();
          this.transport.markEverythingAsDead();
        }, DISCONNECT_SESSION_AFTER);
      });
  }

}

export default new ReactiveTrader(transport);
{'fraction_non_alphanumeric': 0.1337532419414598, 'fraction_numerical': 0.007410151908114116, 'mean_word_length': 3.7957371225577266, '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': '2755090', 'n_tokens_mistral': 770, 'n_tokens_neox': 732, 'n_words': 167}