Follow-up to this … it’s still not canceling.
=====
use v5.26;
use Mojo::UserAgent;
$| = 1;
my $ua = Mojo::UserAgent->new();
my $tx = $ua->build_tx( GET => '
http://google.com' );
$tx->on( connection => sub { $tx->completed(); say "canceled" } );
$ua->start_p($tx)->then( sub { say "finished" } );
Mojo::IOLoop->timer(2, sub { Mojo::IOLoop->stop() });
Mojo::IOLoop->start();
=====
It prints “canceled”, but strace shows that it continues with the request after then. Is there something else I need to do?
Sebastian: Do you recall off-hand which tests set a response error from the client logic? I’ve looked over the ones that seem like they might be related, but I’ve not found it.
Thank you both!
cheers,
-Felipe