Mojolicious prueba y plackup en vivo son diferentes

sometimes when I run the test, I get the following.

# Inactivity timeout

Mojo's documentation seems to recommend adding


however when I try adding this into the program I get this error on my plackup run instance

[fatal] Processing request failed: encountered object 'Can't call method "timeout" on an undefined value at ... line 22.

The likely reason this is timing out is due to a really slow HTTP request that's being run through a client library that uses LWP (though I've tried replacing LWP with AnyEvent::HTTP::LWP::UserAgent without any real code changes, just passing a different useragent)

I'm wondering what I might attempt to do to keep the connection running in the test, I don't seem to have a problem with live requests through chrome, or should I be looking in a different direction entirely?

preguntado el 04 de julio de 12 a las 00:07

mh.. maybe it´s the socket instance? try my $socket = $self->tx->connection);print (defined $socket) ? Mojo::IOLoop->stream($socket)->timeout(300) ? "socket undef"; - maybe it isolates your problem a lil more.. -

considering I asked this over a year ago, and am not longer employed where I had this problem... I'm not even sure that this problem would exist under a current mojo, give its rapid development. -

haha thats wicked ;) havent seen that the question is soo old ;) -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.