Skip to content

Commit

Permalink
better reason examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 11, 2013
1 parent feb2769 commit 375b9f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Transaction/WebSocket.pm
Expand Up @@ -517,7 +517,7 @@ Connection identifier or socket.
$ws = $ws->finish;
$ws = $ws->finish(1000);
$ws = $ws->finish(1003, 'What was that?');
$ws = $ws->finish(1003 => 'Cannot accept data!');
Finish the WebSocket connection gracefully.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Controller.pm
Expand Up @@ -553,7 +553,7 @@ Access request cookie values and create new response cookies.
$c = $c->finish;
$c = $c->finish(1000);
$c = $c->finish(1003, 'What was that?');
$c = $c->finish(1003 => 'Cannot accept data!');
$c = $c->finish('Bye!');
Gracefully end WebSocket connection or long poll stream.
Expand Down
2 changes: 1 addition & 1 deletion lib/Test/Mojo.pm
Expand Up @@ -597,7 +597,7 @@ Opposite of C<element_exists>.
$t = $t->finish_ok;
$t = $t->finish_ok(1000);
$t = $t->finish_ok(1003, 'What was that?');
$t = $t->finish_ok(1003 => 'Cannot accept data!');
Finish WebSocket connection gracefully.
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/websocket.t
Expand Up @@ -59,7 +59,7 @@ websocket '/socket' => sub {
$self->req->headers->host => sub {
my $self = shift;
$self->send(Mojo::IOLoop->stream($self->tx->connection)->timeout);
$self->finish(1000, 'I ♥ Mojolicious!');
$self->finish(1000 => 'I ♥ Mojolicious!');
}
);
};
Expand Down

0 comments on commit 375b9f0

Please sign in to comment.