temp/www/build/bundle.js
/**
         * Called upon transport close.
         *
         * @api private
         */
Called upon transport close.
@api private
Called upon transport close . @api private
onClose(reason, desc) {
            if ("opening" === this.readyState ||
                "open" === this.readyState ||
                "closing" === this.readyState) {
                this.clearTimeoutFn(this.pingTimeoutTimer);
                this.transport.removeAllListeners("close");
                this.transport.close();
                this.transport.removeAllListeners();
                if (typeof removeEventListener === "function") {
                    removeEventListener("offline", this.offlineEventListener, false);
                }
                this.readyState = "closed";
                this.id = null;
                this.emitReserved("close", reason, desc);
                this.writeBuffer = [];
                this.prevBufferLen = 0;
            }
        }
onClose ( reason , desc ) { if ( "opening" === this . readyState || "open" === this . readyState || "closing" === this . readyState ) { this . clearTimeoutFn ( this . pingTimeoutTimer ) ; this . transport . removeAllListeners ( "close" ) ; this . transport . close ( ) ; this . transport . removeAllListeners ( ) ; if ( typeof removeEventListener === "function" ) { removeEventListener ( "offline" , this . offlineEventListener , false ) ; } this . readyState = "closed" ; this . id = null ; this . emitReserved ( "close" , reason , desc ) ; this . writeBuffer = [ ] ; this . prevBufferLen = 0 ; } }
Called upon transport close.
Called upon transport close .
// clear timers // stop event from firing again for transport // ensure transport won't stay open // ignore further transport communication // set ready state // clear session id // emit close event // clean buffers after, so users can still // grab the buffers on `close` event