Skip to content

Commit

Permalink
fix irrelevant scope issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmay committed Jul 7, 2010
1 parent a268b10 commit 01282ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/App/Termcast/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ sub BUILD {
);
my $cv = AnyEvent->condvar;
my $user_object;

$self->set_termcast_handle($h->handle_id => $h);

$h->push_read(
line => sub {
my ($h, $line) = @_;
Expand All @@ -84,6 +87,7 @@ sub BUILD {
#$cv->send;
if (not defined $user_object) {
warn "Authentication failed";
$self->delete_termcast_handle($h->handle_id);
$h->destroy;
}
else {
Expand All @@ -95,7 +99,6 @@ sub BUILD {

$h->session($session);

$self->set_termcast_handle($h->handle_id => $h);

$self->send_connection_notice($h->handle_id);
}
Expand Down

0 comments on commit 01282ed

Please sign in to comment.