This commit is contained in:
2020-12-17 15:19:59 +08:00
parent a941ebf609
commit f7068a01ac
2 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -420,10 +420,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
/**
* @param null $data
* @return bool|BaseActiveRecord
* @return bool|$this
* @throws Exception
*/
public function save($data = NULL): bool|static
public function save($data = NULL): static|bool
{
if (is_array($data)) {
$this->setAttributes($data);
+4 -5
View File
@@ -27,13 +27,12 @@ class OnMessage extends Callback
*/
public function onHandler(Server $server, Frame $frame)
{
$event = Snowflake::app()->getEvent();
Coroutine::defer(function () use ($event) {
$event->trigger(Event::EVENT_AFTER_REQUEST);
});
try {
if ($frame->opcode != 0x08) {
$event = Snowflake::app()->getEvent();
Coroutine::defer(function () use ($event) {
var_dump('Event::EVENT_AFTER_REQUEST');
$event->trigger(Event::EVENT_AFTER_REQUEST);
});
$content = $this->resolve($event, $frame, $server);
if (!empty($content)) {
$server->send($frame->fd, $content);