Skip to content

Commit

Permalink
适配swoole 5.x在8.3下废弃协程Mysqli客户端
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Nov 27, 2023
1 parent 2514baf commit abdd039
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ function close():bool
$this->mysqlClient->close();
}
$this->mysqlClient = null;
}else{
$this->mysqlClient->close();
$this->mysqliHasConnected = false;
}else if($this->mysqlClient instanceof mysqli){
if($this->mysqliHasConnected){
$this->mysqlClient->close();
$this->mysqliHasConnected = false;
}
$this->mysqlClient = null;
}
return true;
Expand Down

0 comments on commit abdd039

Please sign in to comment.