Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cmd/sst/mosaic.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func CmdMosaic(c *cli.Cli) error {
var cmd *exec.Cmd
var last *dev.EnvResponse
processExited := make(chan bool)
timeout := time.Minute * 50
timeout := time.Hour * 24
timer := time.NewTimer(timeout)
defer timer.Stop()

Expand Down Expand Up @@ -102,8 +102,15 @@ func CmdMosaic(c *cli.Cli) error {
if err != nil {
return err
}
if _, ok := nextEnv.Env["AWS_ACCESS_KEY_ID"]; ok {
if _, ok := nextEnv.Env["AWS_ACCESS_KEY_ID"]; ok && timeout != time.Minute*45 {
timeout = time.Minute * 45
if !timer.Stop() {
select {
case <-timer.C:
default:
}
}
timer.Reset(timeout)
}
if last == nil || diff(last.Env, nextEnv.Env) || last.Command != nextEnv.Command {
if cmd != nil && cmd.Process != nil {
Expand Down
Loading