eventmachine-tail icon indicating copy to clipboard operation
eventmachine-tail copied to clipboard

bug with @file being null

Open abacha opened this issue 14 years ago • 1 comments

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?

abacha avatar Apr 19 '12 12:04 abacha

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.

darkskiez avatar Dec 06 '12 16:12 darkskiez