code: 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();
              }
docs: Called if we succeed at the final setup