On 11/27/18 12:24 PM, john wrote:
I created an application which I feel reproduces the problem. If I
use Mojo::IOLoop::Subprocess in a specfic way it causes the Websocket
code to behave erratically. I feel like I am using the framework as
intended but if not this will hopefully provide some insight into
what I am doing wrong.
This issue is now resolved based on feedback in this issue:
https://github.com/mojolicious/mojo/issues/1297
Per that thread I changed my code by storing the Websocket's PID and
then comparing it to the PID that emitted the on finish event.
websocket '/ws' => sub {
my $self = shift;
my $me = $$;
app->log->debug(sprintf 'Client connected: %s', $self->tx);
$self->on(finish => sub {
return unless $$ == $me;
app->log->debug('Client disconnected');
});
};
--
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.