From 058eb3d8df4ea49a538dbd61fd1325403648ca8e Mon Sep 17 00:00:00 2001 From: miraclesu Date: Tue, 24 Sep 2013 09:13:19 +0800 Subject: [PATCH] combine two if conditions --- tail.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tail.go b/tail.go index 0a10f5b..ec0a255 100644 --- a/tail.go +++ b/tail.go @@ -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 } }