<commit_before>import { EventEmitter } from '@scola/events';
import Connection from './connection';

export default class Connector extends EventEmitter {
  constructor() {
    super();

    this._server = null;
    this._codec = null;
    this._router = null;
    this._options = null;

    this._connections = new Set();

    this._handleConnection = (s) => this._connection(s);
    this._handleClose = (e) => this._close(e);
    this._handleError = (e) => this._error(e);
  }

  close(code, reason) {
    this._unbindServer();
    this._closeConnections(code, reason);
    this._server.close();
  }

  server(value) {
    this._server = value;
    this._bindServer();

    return this;
  }

  router(value) {
    this._router = value;
    return this;
  }

  codec(value) {
    this._codec = value;
    return this;
  }

  options(value) {
    this._options = value;
    return this;
  }
<commit_msg>Do not close server<commit_after>import { EventEmitter } from '@scola/events';
import Connection from './connection';

export default class Connector extends EventEmitter {
  constructor() {
    super();

    this._server = null;
    this._codec = null;
    this._router = null;
    this._options = null;

    this._connections = new Set();

    this._handleConnection = (s) => this._connection(s);
    this._handleClose = (e) => this._close(e);
    this._handleError = (e) => this._error(e);
  }

  close(code, reason) {
    this._unbindServer();
    this._closeConnections(code, reason);
  }

  server(value) {
    this._server = value;
    this._bindServer();

    return this;
  }

  router(value) {
    this._router = value;
    return this;
  }

  codec(value) {
    this._codec = value;
    return this;
  }

  options(value) {
    this._options = value;
    return this;
  }

{'fraction_non_alphanumeric': 0.13717805151175813, 'fraction_numerical': 0.0, 'mean_word_length': 2.843010752688172, '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': '3900112', 'n_tokens_mistral': 582, 'n_tokens_neox': 563, 'n_words': 128}