Prevent closing dbh handles twice.

This commit is contained in:
Colin Kuskie 2009-04-10 16:31:54 +00:00
parent 75ad1c14ff
commit 1665af184d

View file

@ -503,9 +503,11 @@ Disconnects from the database. And destroys the object.
=cut
sub disconnect {
my $self = shift;
$self->dbh->disconnect;
undef $self;
my $self = shift;
my $dbh = delete $self->{_dbh};
if ($dbh) {
$dbh->disconnect;
}
}