diff options
Diffstat (limited to 'rhimport')
-rw-r--r-- | rhimport/session.go | 4 |
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) |