A
Alex Young
Does this look familiar to anyone?
NoMethodError: undefined method `+' for nil:NilClass at
/usr/local/lib/ruby/1.8/net/protocol.rb:176:in `write0'
I'm getting it sporadically during some fairly heavy XMLRPC traffic. It
doesn't make very much sense to me, because write0 looks like this:
def write0(str)
@debug_output << str.dump if @debug_output
len = @io.write(str)
@written_bytes += len # <= line 176
len
end
The error must mean that @written_bytes is nil. It's only called from
within a block passed to writing, which looks like this:
def writing
@written_bytes = 0
@debug_output << '<- ' if @debug_output
yield
@debug_output << "\n" if @debug_output
bytes = @written_bytes
@written_bytes = nil
bytes
end
Is this a known thread-safety issue with a known solution, or would a
patch be in order? I've been testing this on 1.8.4, because that's what
we've got in production. Does anyone know if it's been addressed in 1.8.5?
Thanks,
NoMethodError: undefined method `+' for nil:NilClass at
/usr/local/lib/ruby/1.8/net/protocol.rb:176:in `write0'
I'm getting it sporadically during some fairly heavy XMLRPC traffic. It
doesn't make very much sense to me, because write0 looks like this:
def write0(str)
@debug_output << str.dump if @debug_output
len = @io.write(str)
@written_bytes += len # <= line 176
len
end
The error must mean that @written_bytes is nil. It's only called from
within a block passed to writing, which looks like this:
def writing
@written_bytes = 0
@debug_output << '<- ' if @debug_output
yield
@debug_output << "\n" if @debug_output
bytes = @written_bytes
@written_bytes = nil
bytes
end
Is this a known thread-safety issue with a known solution, or would a
patch be in order? I've been testing this on 1.8.4, because that's what
we've got in production. Does anyone know if it's been addressed in 1.8.5?
Thanks,