Skip to content

Instantly share code, notes, and snippets.

@skaurus
Created October 16, 2011 14:50
Show Gist options
  • Save skaurus/1290970 to your computer and use it in GitHub Desktop.
Save skaurus/1290970 to your computer and use it in GitHub Desktop.
Mojo/EV bug part 1
Run server as:
./mojo_ev_test.pl daemon --listen http://localhost:4242 --clients 1
Send requests as:
perl -Mstrict -MAnyEvent::HTTP -MData::Dumper -e 'my $cv = AnyEvent->condvar; http_post("http://localhost:4242/hitme", "", timeout => 10, persistent => 0, sub { my ($b, $h) = @_; warn Dumper $h; $cv->send() }); $cv->recv;'
First request dumps headers fine, consequent requests timeouts.
If we change MOJO_POLL to 1 in first lines of server, it works fine.
My versions:
OS: Debian 6.03
Perl: 5.12.3
libev: 1:3.9-1
EV: 4.03
AnyEvent: 6.1 (updated trying to solve this problem, it doesn't change anything. Before that was 5.31 if I remember correctly)
Mojolicious: 1.65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment