eventmachine-tail
eventmachine-tail copied to clipboard
bug with @file being null
I don't know exactly why but apparently @file gets nil here:
@position = @file.sysseek(0, IO::SEEK_END)
and its raising an error
EventMachine error: undefined method sysseek' for nil:NilClass - /usr/lib64/ruby/gems/1.8/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:106:in initialize'
I think it has to do with a reopening of a file
maybe check if @file.nil?
I've seen this issue too, its when you've called .close on a reader when its not fully initialized yet.
Its not easy to work around this, maybe add your own close that waits for eof to have been called, not ideal.