mastodon-api
mastodon-api copied to clipboard
openssl/buffering.rb: `sysread': end of file reached (EOFError)
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
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.