mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
#282: set flag idle logic to cli-run phase
This commit is contained in:
parent
a120b58dc2
commit
38a3f01868
@ -197,7 +197,7 @@ func Run() {
|
||||
}
|
||||
|
||||
// Start session cleanup worker
|
||||
if options.Sessions {
|
||||
if options.Sessions && !command.Opts.ConnectionIdleTimeoutDisabled {
|
||||
go api.StartSessionCleanup()
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user