example/server.rb in http-2-0.8.0 vs example/server.rb in http-2-0.8.1

- old
+ new

@@ -43,11 +43,11 @@ conn.on(:stream) do |stream| log = Logger.new(stream.id) req, buffer = {}, '' - stream.on(:active) { log.info 'cliend opened new stream' } + stream.on(:active) { log.info 'client opened new stream' } stream.on(:close) { log.info 'stream closed' } stream.on(:headers) do |h| req = Hash[*h.flatten] log.info "request headers: #{h}" @@ -87,10 +87,11 @@ # puts "Received bytes: #{data.unpack("H*").first}" begin conn << data rescue => e - puts "Exception: #{e}, #{e.message} - closing socket." + puts "#{e.class} exception: #{e.message} - closing socket." + e.backtrace.each { |l| puts "\t" + l } sock.close end end end