Discussion:
[Mojolicious] How do I force Mojo::UserAgent to close connection?
Alex Povolotsky
2018-10-10 21:53:52 UTC
Permalink
Hello

Reusing connections as it does Mojo::UserAgent is nice, but sometimes I
have to change source IP of all next requests for given UA. Just changing
local_address for tx seems to be pointless and ignored by Mojo::UserAgent.
What should I do to perform the trick correctly?

Alex
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Dan Book
2018-10-10 22:07:57 UTC
Permalink
$ua->max_connections(0);

https://metacpan.org/pod/Mojo::UserAgent#max_connections

-Dan
Post by Alex Povolotsky
Hello
Reusing connections as it does Mojo::UserAgent is nice, but sometimes I
have to change source IP of all next requests for given UA. Just changing
local_address for tx seems to be pointless and ignored by Mojo::UserAgent.
What should I do to perform the trick correctly?
Alex
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Alex Povolotsky
2018-10-11 16:32:30 UTC
Permalink
That simple!!! Thanks a lot. I wonder how did I miss it in the manual.
Post by Dan Book
$ua->max_connections(0);
https://metacpan.org/pod/Mojo::UserAgent#max_connections
-Dan
Post by Alex Povolotsky
Hello
Reusing connections as it does Mojo::UserAgent is nice, but sometimes I
have to change source IP of all next requests for given UA. Just changing
local_address for tx seems to be pointless and ignored by Mojo::UserAgent.
What should I do to perform the trick correctly?
Alex
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Loading...