msgpack-ruby
msgpack-ruby copied to clipboard
[JRuby] Thread blocked on `MessagePack::Unpacker.new(socket)`
# jruby 9.1.13.0 (2.3.3)
sock = TCPSocket.new "localhost", 3000
u = MessagePack::Unpacker.new sock # => blocked here
# - unreachable, until remote endpoint close the connection -
u.each { |pack| p pack }
but if MessagePack::Unpacker.new(file_stream)
is called on a file I/O stream, everything is ok
Yeah isn't it blocked because it's trying to read from the socket? If you put some data into the socket from the other end does it work?