if(!this._cometd._initialized){ return; } if(this._cometd._polling) { console.debug("wait for poll to complete or fail"); return; } if((this._cometd._advice) && (this._cometd._advice["reconnect"]=="handshake")){ this._cometd._connected=false; this._initialized = false; this._cometd.init(this._cometd.url,this._cometd._props); }else if(this._cometd._connected){ var message={ channel: "/meta/connect", connectionType: this._connectionType, clientId: this._cometd.clientId, id: ""+this._cometd.messageId++ }; if (this._cometd.connectTimeout>this._cometd.expectedNetworkDelay) message.advice={timeout:(this._cometd.connectTimeout-this._cometd.expectedNetworkDelay)}; message=this._cometd._extendOut(message); this.openTunnelWith({message: dojo.toJson([message])}); }