Skip to content

Commit

Permalink
fix a bug on linux where the TailFile will randomly disconnect
Browse files Browse the repository at this point in the history
seems to be related to

hpcloud/tail#90
  • Loading branch information
christian wywiorski committed Jul 18, 2017
1 parent 18c0b97 commit 108ff26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ func (c *ServiceCommand) waitForLogText(line string, cancel <-chan struct{}) err
// Read output until we get the success
var t *tail.Tail
var err error
t, err = tail.TailFile(c.Service.GetRunLog(), tail.Config{Follow: true, Logger: tail.DiscardingLogger})
t, err = tail.TailFile(c.Service.GetRunLog(), tail.Config{
Follow: true,
ReOpen: true,
Poll: true,
Logger: tail.DiscardingLogger,
})
if err != nil {
return errors.WithStack(err)
}
Expand Down

0 comments on commit 108ff26

Please sign in to comment.