jrpc.js
function shutdown() {
  var instance = this;

  instance.active = false;
  instance.transmitter = null;
  instance.remoteTimeout = 0;
  instance.localTimeout = 0;
  instance.localComponents = {};
  instance.remoteComponents = {};
  instance.outbox.requests.length = 0;
  instance.outbox.responses.length = 0;
  instance.inbox = {};
  instance.exposed = {};

  Object.keys(instance.localTimers).forEach(function(key) {
    clearTimeout(instance.localTimers[key]);
    delete instance.localTimers[key];
  });

  Object.keys(instance.outTimers).forEach(function(key) {
    clearTimeout(instance.outTimers[key]);
    delete instance.outTimers[key];
  });

  return instance;
}
function shutdown() {
  var instance = this;

  instance.active = false;
  instance.transmitter = null;
  instance.remoteTimeout = 0;
  instance.localTimeout = 0;
  instance.localComponents = {};
  instance.remoteComponents = {};
  instance.outbox.requests.length = 0;
  instance.outbox.responses.length = 0;
  instance.inbox = {};
  instance.exposed = {};

  Object.keys(instance.localTimers).forEach(function(key) {
    clearTimeout(instance.localTimers[key]);
    delete instance.localTimers[key];
  });

  Object.keys(instance.outTimers).forEach(function(key) {
    clearTimeout(instance.outTimers[key]);
    delete instance.outTimers[key];
  });

  return instance;
}
function shutdown ( ) { var instance = this ; instance . active = false ; instance . transmitter = null ; instance . remoteTimeout = 0 ; instance . localTimeout = 0 ; instance . localComponents = { } ; instance . remoteComponents = { } ; instance . outbox . requests . length = 0 ; instance . outbox . responses . length = 0 ; instance . inbox = { } ; instance . exposed = { } ; Object . keys ( instance . localTimers ) . forEach ( function ( key ) { clearTimeout ( instance . localTimers [ key ] ) ; delete instance . localTimers [ key ] ; } ) ; Object . keys ( instance . outTimers ) . forEach ( function ( key ) { clearTimeout ( instance . outTimers [ key ] ) ; delete instance . outTimers [ key ] ; } ) ; return instance ; }
Semi-destructor for limbo conditions

When we lose connection permanently, we help garbage collection by removing
as many references as we can, including cancelling any outstanding timers.
We may still get some callbacks, but they will immediately return.

@return {undefined} No return value
Semi - destructor for limbo conditions