Closed xqjcool1 closed 7 years ago
we should update @stat=stat even if @stat is existing I encounted the situation as below: file-tail is tailing the system.log, the @stat.size is 0. after logrotate copytruncate the system.log. file-tail readline and throw a EOF, the restat method doesn't trigger the ReopenException because the @stat.size is 0. It will never enter the judgement "stat.size < @stat.size"
I resolve it on fork branch.
After logrotate(copytruncate), file-tail can't read line for a while. for example: I tail a system.log using shell tail. after logrotate , it works well. I tail a system.log using ruby file-tail. after logrotate, sometimes it can't read line for a while