Discussion:
Client hangs on error in read
(too old to reply)
Ganesh Udupa
2018-08-17 04:29:05 UTC
Permalink
I have a java client talking to a mojo server. Sometimes ( very rarely)
the method _read in Stream.pm ends up with an error. ( Not sure what the
error is since its never printed). This will be caught in the code block
stream->on(error..., ) in Daemon.pm ( The method _listen) . Since it just
logs the error and doesn't send the response back ( The error message is
empty) , the client will hang forever. How do we send an error code back
to the client?
I was thinking something like below
sub { $self && *$self->respond_hash( 501 { message => "Internal Server
Error" }, "error")* && $self->app->log->error(pop) && $self->_close($id)
});
But respond_hash is not a valid key of $self. I am unable to inspect the
keys in $self using Dumper.
I would appreciate if anyone could help here.
(PS: I am not a perl expert)
--
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 mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
sri
2018-08-17 10:19:53 UTC
Permalink
What version of Mojolicious are you having problems with? Are
you sure you don't just need to upgrade?

https://twitter.com/kraih/status/1029515722521829376

--
sebastian
--
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 mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Ganesh Udupa
2018-08-17 11:07:57 UTC
Permalink
I am using 5.28. Yes. I will upgrade. Btw even in the latest code, its the
same behavior. As you can see,
https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Daemon.pm#L199
just logs it and doesn't return anything to the caller . Due to this, the
client will hang.
Post by sri
What version of Mojolicious are you having problems with? Are
you sure you don't just need to upgrade?
https://twitter.com/kraih/status/1029515722521829376
--
sebastian
--
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
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
--
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 mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Loading...