Skip to content

Commit

Permalink
let the client close the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 14, 2015
1 parent cab348a commit 1179af4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/mojo/ioloop.t
Expand Up @@ -273,9 +273,9 @@ is $finish, 1, 'finish event has been emitted once';
# Graceful shutdown (max_accepts)
$err = '';
$loop = Mojo::IOLoop->new->max_accepts(1);
$id = $loop->server({address => '127.0.0.1'} => sub { shift; shift->close });
$id = $loop->server({address => '127.0.0.1'} => sub { });
$port = $loop->acceptor($id)->port;
$loop->client({port => $port} => sub { });
$loop->client({port => $port} => sub { pop->close });
$loop->timer(30 => sub { shift->stop; $err = 'failed' });
$loop->start;
ok !$err, 'no error';
Expand Down

0 comments on commit 1179af4

Please sign in to comment.