on_accept => sub {
$self->setup_connection($_[0]);
},
+ on_accept_error => sub {
+ $self->handle_stop;
+ },
);
$start{start} = sub {}; # delete yourself
};
# there's probably something more intelligent to do here, but meh
die failure => 'starting' if $self->state eq 'starting';
Tak->loop->remove($self->clear_listener);
+ unlink($self->socket_location);
$self->state('down');
return 'stopped';
}
return if $gd;
if (my $l = $self->listener) {
$l->get_loop->remove($l);
+ unlink($self->socket_location);
}
}
my $connection;
$connection = Tak::ConnectionService->new(
read_fh => $socket, write_fh => $socket,
- listening_service => $self->router,
+ listening_service => $self->router->clone,
on_close => sub { delete $conn_set->{$connection} }
);
$conn_set->{$connection} = $connection;