#282: added timeout flags & tuned client.IsIdle()
This commit is contained in:
@@ -367,7 +367,10 @@ func (client *Client) Close() error {
|
||||
}
|
||||
|
||||
func (client *Client) IsIdle() bool {
|
||||
return time.Since(client.lastQueryTime).Hours() > 1
|
||||
if command.Opts.ConnectionIdleTimeoutDisabled {
|
||||
return true
|
||||
}
|
||||
return time.Since(client.lastQueryTime).Minutes() > command.Opts.ConnectionIdleTimeout
|
||||
}
|
||||
|
||||
// Fetch all rows as strings for a single column
|
||||
|
||||
Reference in New Issue
Block a user