summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-28 23:32:31 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-28 23:32:31 (GMT)
commit6318f15059d09fc6c786a479383d53c971e27c2c (patch)
treee78fd3b77caf9c5eeda5cc0547d27ebb3a0041cc /rhimport
parent3d531954d12cbc09a8791581b1911e6e39d86203 (diff)
don't allow unlimited sessions
Diffstat (limited to 'rhimport')
-rw-r--r--rhimport/session.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rhimport/session.go b/rhimport/session.go
index e749020..39c02a4 100644
--- a/rhimport/session.go
+++ b/rhimport/session.go
@@ -144,8 +144,8 @@ func (s *session) run(timeout time.Duration) {
s.ctx.Cancel = s.cancelIntChan
go sessionRun(s.ctx, s.doneIntChan)
s.state = _SESSION_RUNNING
- if timeout > 3*time.Hour {
- s.ctx.stdlog.Printf("requested session timeout (%v) is to high - lowering to 3h", timeout)
+ if timeout <= 0 || timeout > 3*time.Hour {
+ s.ctx.stdlog.Printf("requested session timeout (%v) is invalid or too high - setting it to 3h", timeout)
timeout = 3 * time.Hour
}
s.timer.Reset(timeout)