lib/async/http/client.rb in async-http-0.16.0 vs lib/async/http/client.rb in async-http-0.17.0
- old
+ new
@@ -84,9 +84,11 @@
Async.logger.debug(self) {"Making connection to #{@endpoint.inspect}"}
@endpoint.each do |endpoint|
peer = endpoint.connect
+ peer.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
+
stream = IO::Stream.new(peer)
break @protocol.client(stream)
end
end