Просмотр исходного кода

session: update defaults for ConnMaxLifetime

to be the same as the 5.0.3 release defaults
Daniel Lee 7 лет назад
Родитель
Сommit
92388f7faf
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      conf/defaults.ini
  2. 1 1
      pkg/setting/setting.go

+ 3 - 0
conf/defaults.ini

@@ -128,6 +128,9 @@ cookie_secure = false
 session_life_time = 86400
 gc_interval_time = 86400
 
+# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
+conn_max_lifetime = 14400
+
 #################################### Data proxy ###########################
 [dataproxy]
 

+ 1 - 1
pkg/setting/setting.go

@@ -636,7 +636,7 @@ func readSessionConfig() {
 		SessionOptions.CookiePath = "/"
 	}
 
-	SessionConnMaxLifetime = Cfg.Section("session").Key("conn_max_lifetime").MustInt64(0)
+	SessionConnMaxLifetime = Cfg.Section("session").Key("conn_max_lifetime").MustInt64(14400)
 }
 
 func initLogging() {