Your local variable $m destroyed in third step of delay. Add something like "$c->stash(m => $m);" before IO::Loop->delay;
среда, 6 июля 2016 г., 16:05:54 UTC+5 пользователь Heiko Jansen написал: > > I´m trying to chain a bunch of requests to a MongoDB server by utilizing > Mojo::IOLoop->delay; > unfortunately the last Mango command (and only the last one) always > returns the error "Premature connection close". > > With MANGO_DEBUG=1 I can see that the last command gets written to the > MongoDB connection and in the the mongod output I can also see that it is > retrieved and executed. > But Mango never logs the response data. > > Apparently it does not matter which command is used as the last one. > I tried to provide a minimal test case with dummy commands here: > https://gist.github.com/heikojansen/3aec5349e7fcc009a420a69a3f8271eb > > I don´t know if it´s a bug in Mango or if I´m lacking some vital > understanding how the event loop works... > > Thx in advance for any hints and suggestions! > - Heiko > -- 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 https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
