jrpc.js
function confirmTransmit(outpacket, err) {
  if (this.active && err) {
    // Roll it all back into outbox (which may not be empty anymore)
    if (outpacket.responses.length > 0) {
      Array.prototype.push.apply(this.outbox.responses, outpacket.responses);
    }
    if (outpacket.requests.length > 0) {
      Array.prototype.push.apply(this.outbox.requests, outpacket.requests);
    }
  }
}
function confirmTransmit(outpacket, err) {
  if (this.active && err) {
    // Roll it all back into outbox (which may not be empty anymore)
    if (outpacket.responses.length > 0) {
      Array.prototype.push.apply(this.outbox.responses, outpacket.responses);
    }
    if (outpacket.requests.length > 0) {
      Array.prototype.push.apply(this.outbox.requests, outpacket.requests);
    }
  }
}
function confirmTransmit ( outpacket , err ) { if ( this . active && err ) { // Roll it all back into outbox (which may not be empty anymore) if ( outpacket . responses . length > 0 ) { Array . prototype . push . apply ( this . outbox . responses , outpacket . responses ) ; } if ( outpacket . requests . length > 0 ) { Array . prototype . push . apply ( this . outbox . requests , outpacket . requests ) ; } } }
Handle transmission errors

@type {JRPC~transmitConfirmCallback}

@param {Object}  outpacket Outbox data of the attempted transmission
@param {boolean} err       Anything non-falsey means an error occured

@return {undefined} No return value
Handle transmission errors