function success() {
                self._ws.onclose = function () {
                    if (self._autoReconnect) {
                        var $promise = self.connect(true);
                        self.trigger("close", $promise);
                    } else {
                        self._cleanup();
                        self.trigger("close");
                    }
                };
                deferred.resolve();
            }
function success() {
                self._ws.onclose = function () {
                    if (self._autoReconnect) {
                        var $promise = self.connect(true);
                        self.trigger("close", $promise);
                    } else {
                        self._cleanup();
                        self.trigger("close");
                    }
                };
                deferred.resolve();
            }
function success ( ) { self . _ws . onclose = function ( ) { if ( self . _autoReconnect ) { var $promise = self . connect ( true ) ; self . trigger ( "close" , $promise ) ; } else { self . _cleanup ( ) ; self . trigger ( "close" ) ; } } ; deferred . resolve ( ) ; }
Called if we succeed at the final setup
Called if we succeed at the final setup
Called when the connection is successful