这是indexloc提供的服务,不要输入任何密码
Skip to content

h2spec http2/6.5.3/1 -p 9000 -o 5 : it hangs #109

@HoneyryderChuck

Description

@HoneyryderChuck

./h2spec --version
Version: 2.3.0 (cb03b47)

I have a very simple code: a socket accepting and printing the metadata. In ruby:

require "socket"

puts "Starting server on port 9000"
server = TCPServer.new(9000)

loop do
  sock = server.accept

  while !sock.closed? && !(sock.eof? rescue true) # rubocop:disable Style/RescueModifier
    puts sock.readpartial(1024).inspect
  end
end

When running the aforementioned spec, it hangs for 5 seconds, after which it opens a connection and immediately closes.

This doesn't seem correct, can anyone confirm it's a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions