Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-04 16:04:22 +08:00
parent 5bf8a7feb1
commit 2a52172af6
+5 -6
View File
@@ -81,12 +81,11 @@ class Connection extends Component
*/ */
public function init() public function init()
{ {
$eventProvider = Kiri::getDi()->get(EventProvider::class); $this->eventProvider->on(OnWorkerStop::class, [$this, 'clear_connection'], 0);
$eventProvider->on(OnWorkerStop::class, [$this, 'clear_connection'], 0); $this->eventProvider->on(OnWorkerExit::class, [$this, 'clear_connection'], 0);
$eventProvider->on(OnWorkerExit::class, [$this, 'clear_connection'], 0); $this->eventProvider->on(BeginTransaction::class, [$this, 'beginTransaction'], 0);
$eventProvider->on(BeginTransaction::class, [$this, 'beginTransaction'], 0); $this->eventProvider->on(Rollback::class, [$this, 'rollback'], 0);
$eventProvider->on(Rollback::class, [$this, 'rollback'], 0); $this->eventProvider->on(Commit::class, [$this, 'commit'], 0);
$eventProvider->on(Commit::class, [$this, 'commit'], 0);
if (Db::transactionsActive()) { if (Db::transactionsActive()) {
$this->beginTransaction(); $this->beginTransaction();