Hi,

I have two parallel XHR calls on my page, both arrives at Mango driver 
(using morbo). The first one is non-blocking, the second blocking (but I 
also tried non-blocking, no difference). The second would not work:

[Mon Aug 25 12:57:37 2014] [error] Non-blocking operations in progress at 
/usr/local/share/perl/5.14.2/Mango/Cursor.pm line 206

The driver is initialized like this:

$self->helper(mango => sub { state $mango = Mango->new('mongodb://'.$config
->{mongodb}->{username}.':'.$config->{mongodb}->{password}.'@'.$config->{
mongodb}->{host}.'/'.$config->{mongodb}->{database}) });

And I'm using it (in both cases, just the first is a ->find() on another 
collection) like:

$self->render_later;
 
$self->mango->db->collection('selections')->find_one({username => $username} 
=> sub {
 my ($collection, $err, $doc) = @_;
 $self->render(json => { selection => $doc->{selection} }, status => 200);
});

I don't assume parallel requests could be an issue, I also don't see many 
users having the same problem, what am I doing wrong?

Thanks!
Rasta

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to