Start a new topic

Settings.SessionTimeoutSeconds

 Hi,


The summary of "Settings.SessionTimeoutSeconds" says that a value of 0 stops the automatic generating of sessions.


  /// <summary>
  /// Controls the amount of time the game can be backgrounded before we
  /// consider a new session to have started.  A value of 0 disables
  /// automatically generating new sessions.
  /// </summary>
  /// <value>The session timeout seconds.</value>


But thats not true if you look at the code



 

        private void OnApplicationPause(bool pauseStatus)
        {
            if (pauseStatus) {
                this.lastActive = DateTime.UtcNow;

            } else {
                var backgroundSeconds = (DateTime.UtcNow - this.lastActive).TotalSeconds;
                if (backgroundSeconds > this.Settings.SessionTimeoutSeconds) {
                    this.lastActive = DateTime.MinValue;
                    this.NewSession();
                }
            }
        }

" if (backgroundSeconds > this.Settings.SessionTimeoutSeconds)"


backgroundSeconds will always be bigger then 0.

Login or Signup to post a comment