#282: set flag idle logic to cli-run phase

This commit is contained in:
ldinc
2017-10-15 01:39:07 +03:00
parent a120b58dc2
commit 38a3f01868
3 changed files with 197 additions and 279 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ func Run() {
}
// Start session cleanup worker
if options.Sessions {
if options.Sessions && !command.Opts.ConnectionIdleTimeoutDisabled {
go api.StartSessionCleanup()
}
-3
View File
@@ -367,9 +367,6 @@ func (client *Client) Close() error {
}
func (client *Client) IsIdle() bool {
if command.Opts.ConnectionIdleTimeoutDisabled {
return false
}
return time.Since(client.lastQueryTime).Minutes() > command.Opts.ConnectionIdleTimeout
}
+196 -275
View File
File diff suppressed because one or more lines are too long