mastodon-api icon indicating copy to clipboard operation
mastodon-api copied to clipboard

openssl/buffering.rb: `sysread': end of file reached (EOFError)

Open called-d opened this issue 7 years ago • 1 comments

I use mastodon-api version: commit cdc93be69bb36416f15bdb102273b70663ae41a1

/usr/lib/ruby/2.4.0/openssl/buffering.rb:125:in `sysread': end of file reached (EOFError)
	from /usr/lib/ruby/2.4.0/openssl/buffering.rb:125:in `readpartial'
	from /path/to/myapp/vendor/bundle/ruby/2.4.0/bundler/gems/mastodon-api-cdc93be69bb3/lib/mastodon/streaming/connection.rb:19:in `stream'
	from /path/to/myapp/vendor/bundle/ruby/2.4.0/bundler/gems/mastodon-api-cdc93be69bb3/lib/mastodon/streaming/client.rb:80:in `request'
	from /path/to/myapp/vendor/bundle/ruby/2.4.0/bundler/gems/mastodon-api-cdc93be69bb3/lib/mastodon/streaming/client.rb:51:in `stream'
	from mer.rb:133:in `block in <main>'
133	  stream_client.stream('public/local') do | status |
134	    if line = status_to_string(status) then
135	      reset_current_line
136	      puts line
137	    end
138	  end

I can't find document about client.stream raising EOFError. Am I missing something? Is this a bug? else I will write rescue EOFError => to retry

called-d avatar May 01 '17 11:05 called-d

IO#readpartial used in Mastodon::Streaming::Connection#stream raises EOFError when stream reached to EOF. https://docs.ruby-lang.org/en/2.4.0/IO.html#method-i-readpartial

Twitter API gem has same issue https://github.com/sferik/twitter/issues/535 , so this might not be solved.

takahashim avatar May 03 '17 07:05 takahashim