Skip to content

Commit

Permalink
wait for the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 9, 2014
1 parent 092b5da commit 10b35cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/mojo/websocket.t
Expand Up @@ -459,10 +459,12 @@ $ua->websocket(
$tx->on(
frame => sub {
my ($tx, $frame) = @_;
$pong = $frame->[5] if $frame->[4] == 10;
Mojo::IOLoop->stop;
return unless $frame->[4] == 10;
$pong = $frame->[5];
$tx->finish;
}
);
$tx->on(finish => sub { Mojo::IOLoop->stop });
$tx->send([1, 0, 0, 0, 9, 'test']);
}
);
Expand Down

0 comments on commit 10b35cd

Please sign in to comment.