diff --git a/lib/Cro/HTTP/Client.pm6 b/lib/Cro/HTTP/Client.pm6 index 3485d14f..5f3dd225 100644 --- a/lib/Cro/HTTP/Client.pm6 +++ b/lib/Cro/HTTP/Client.pm6 @@ -666,10 +666,10 @@ class Cro::HTTP::Client { my $in = Supplier::Preserving.new; my %ca = self ?? (self.ca // $ca // {}) !! $ca // {}; my $out = $version-decision - ?? establish($connector, $in.Supply, $log-connection, :$host, :$port, |{%tls-config, %ca}) + ?? establish($connector, $in.Supply, $log-connection, :nodelay, :$host, :$port, |{%tls-config, %ca}) !! do { my $s = Supplier::Preserving.new; - establish($connector, $in.Supply, $log-connection, :$host, :$port, |{%tls-config, %ca}).tap: + establish($connector, $in.Supply, $log-connection, :nodelay, :$host, :$port, |{%tls-config, %ca}).tap: { $s.emit($_) }, done => { $s.done }, quit => { diff --git a/lib/Cro/HTTP/Server.pm6 b/lib/Cro/HTTP/Server.pm6 index 29c9f933..18f2ea0b 100644 --- a/lib/Cro/HTTP/Server.pm6 +++ b/lib/Cro/HTTP/Server.pm6 @@ -139,6 +139,7 @@ class Cro::HTTP::Server does Cro::Service { return pack2(:!http2-only); } elsif $http-val eqv <1.1>|() { my $listener = Cro::TLS::Listener.new( + :nodelay, |(:$host with $host), |(:$port with $port), |%tls); @@ -150,6 +151,7 @@ class Cro::HTTP::Server does Cro::Service { else { if so $http-val == <1.1>|() { my $listener = Cro::TCP::Listener.new( + :nodelay, |(:$host with $host), |(:$port with $port)); return pack1($listener);