Skip to content

Commit

Permalink
Merge pull request #84 from botuniverse/bugfix/no-co-bug
Browse files Browse the repository at this point in the history
修复非协程环境下无法分发事件的 Bug
  • Loading branch information
crazywhalecc authored Dec 31, 2022
2 parents b73b918 + 37be79f commit 97b8e7e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"ext-json": "*",
"psr/cache": "^1.0",
"psr/event-dispatcher": "^1.0",
"psr/http-client": "^1.0",
"psr/log": "^1.1",
"rybakit/msgpack": "^0.9.0",
"choir/psr-http": "^1.0",
Expand Down
1 change: 0 additions & 1 deletion src/OneBot/Driver/Event/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public function dispatch(object $event, bool $inside = false): object
$co->create([$this, 'dispatch'], $event, true);
return $event;
}
ob_logger()->warning('Dispatching event in fiber: ' . $co->getCid());
foreach (ob_event_provider()->getEventListeners($event->getName()) as $listener) {
try {
// TODO: 允许 Listener 修改 $event
Expand Down
2 changes: 1 addition & 1 deletion src/OneBot/global_defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use ZM\Logger\ConsoleLogger;

const ONEBOT_VERSION = '12';
const ONEBOT_LIBOB_VERSION = '0.5.1';
const ONEBOT_LIBOB_VERSION = '0.5.2';

const ONEBOT_JSON = 1;
const ONEBOT_MSGPACK = 2;
Expand Down

0 comments on commit 97b8e7e

Please sign in to comment.