Prevent closing dbh handles twice.
This commit is contained in:
parent
75ad1c14ff
commit
1665af184d
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue