Changeset 3acab0e
- Timestamp:
- Dec 28, 2009, 12:25:00 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 416241f
- Parents:
- 54b4a87
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/22/09 17:53:48)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/28/09 00:25:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
rac374fc r3acab0e 23 23 24 24 use BarnOwl; 25 use Scalar::Util qw(weaken); 25 26 26 27 BEGIN { … … 315 316 my $interval = shift || 5; 316 317 delete $BarnOwl::Module::IRC::ircnets{$self->alias}; 317 $BarnOwl::Module::IRC::reconnect{$self->alias} = 318 $BarnOwl::Module::IRC::reconnect{$self->alias} = $self; 319 my $weak = $self; 320 weaken($weak); 321 $self->{reconnect_timer} = 318 322 BarnOwl::Timer->new( { 319 323 after => $interval, 320 324 cb => sub { 321 $ self->reconnect( $interval );325 $weak->reconnect( $interval ) if $weak; 322 326 }, 323 327 } ); … … 329 333 BarnOwl::admin_message("IRC", $msg); 330 334 delete $BarnOwl::Module::IRC::reconnect{$self->alias}; 335 delete $self->{reconnect_timer}; 331 336 $BarnOwl::Module::IRC::ircnets{$self->alias} = $self; 332 337 my $fd = $self->getSocket()->fileno();
Note: See TracChangeset
for help on using the changeset viewer.