combine two if conditions

This commit is contained in:
miraclesu 2013-09-24 09:13:19 +08:00
parent a7f9b4b6fc
commit 058eb3d8df
1 changed files with 3 additions and 4 deletions

View File

@ -157,11 +157,10 @@ func (tail *Tail) tailFileSync() {
if !tail.MustExist {
// deferred first open.
err := tail.reopen()
if err == tomb.ErrDying {
return
}
if err != nil {
tail.Kill(err)
if err != tomb.ErrDying {
tail.Kill(err)
}
return
}
}