combine two if conditions
This commit is contained in:
parent
a7f9b4b6fc
commit
058eb3d8df
7
tail.go
7
tail.go
|
@ -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 {
|
||||||
tail.Kill(err)
|
if err != tomb.ErrDying {
|
||||||
|
tail.Kill(err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue