When I set websocket events inside $c->delay() browser disconnects almost
immediately ("finish" event is properly triggered).
Please explain what is wrong here.
======================
use Mojolicious::Lite;
websocket '/ws/:sessid' => sub {
my ($c) = @_;
$c->delay(sub{
$c->on(finish => sub { warn "disconnect\n" });
$c->on(json => sub { warn "incoming ws json \n" });
});
};
--
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.