Skip to content

Commit

Permalink
clean up this implicit hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Closs committed Aug 15, 2011
1 parent 16faf9a commit dcbf004
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Biopay.pm
Expand Up @@ -24,12 +24,17 @@ my %public_paths = (

before sub {
my $path = request->path_info;
if (session('bio')) {
# Let AE run, it can cleanup any lingering AE::HTTP state

# XXX hack to try to work around the 596 bug from AE::HTTP
# If this issue persists using other couch instances
# Let AE run until idle.
# - The thinking here is that maybe this will allow AE::HTTP to
# close down any lingering old connections before blindly trying
# to reuse them.
{
my $w = AnyEvent->condvar;
my $idle = AnyEvent->idle (cb => sub { $w->send });
$w->recv; # enters "main loop" till $condvar gets −>send
return;
}

unless ($public_paths{$path} or $path =~ m{^/(login|set-password)}) {
Expand Down

0 comments on commit dcbf004

Please sign in to comment.