summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-06-27 21:18:08 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-06-27 21:18:08 (GMT)
commit7538b0e7d2fc5b0e0ed2d26efd67ce1ffc9c006c (patch)
tree14785ff528816b6f2db3ac735414754aa039235e
parente6eeeb7ff9b50163f526297450321f8a47e4fb17 (diff)
reset sesssion timeout to 3h if set > 3h from interface
-rw-r--r--rhimport/session.go4
1 files changed, 4 insertions, 0 deletions
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
}