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 { if !tail.MustExist {
// deferred first open. // deferred first open.
err := tail.reopen() err := tail.reopen()
if err == tomb.ErrDying {
return
}
if err != nil { if err != nil {
if err != tomb.ErrDying {
tail.Kill(err) tail.Kill(err)
}
return return
} }
} }