From 7538b0e7d2fc5b0e0ed2d26efd67ce1ffc9c006c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 27 Jun 2016 23:18:08 +0200 Subject: reset sesssion timeout to 3h if set > 3h from interface diff --git a/rhimport/session.go b/rhimport/session.go index ece5303..b00be17 100644 --- a/rhimport/session.go +++ b/rhimport/session.go @@ -132,6 +132,10 @@ func (self *Session) run(timeout time.Duration) { self.ctx.Cancel = self.cancelIntChan go sessionRun(self.ctx, self.doneIntChan) self.state = SESSION_RUNNING + if timeout > 3*time.Hour { + rhl.Printf("requested session timeout (%v) is to high - lowering to 3h", timeout) + timeout = 3 * time.Hour + } self.timer.Reset(timeout) return } -- cgit v0.10.2