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 =cut
sub disconnect { sub disconnect {
my $self = shift; my $self = shift;
$self->dbh->disconnect; my $dbh = delete $self->{_dbh};
undef $self; if ($dbh) {
$dbh->disconnect;
}
} }