Skip to content

Commit

Permalink
mention how to increase the size limit for WebSocket messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 28, 2015
1 parent 7a8e71f commit b9f92e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -462,6 +462,9 @@ underlying connection might get closed early.
my $address = $c->tx->remote_address;
my $port = $c->tx->remote_port;
# Increase size limit for WebSocket messages to 16MB
$c->tx->max_websocket_size(16777216) if $c->tx->is_websocket;
# Perform non-blocking operation without knowing the connection status
my $tx = $c->tx;
Mojo::IOLoop->timer(2 => sub {
Expand Down

0 comments on commit b9f92e3

Please sign in to comment.