修复 _global_callback 收不到位置消息的 bug

This commit is contained in:
tursom 2024-03-01 15:29:41 +08:00
parent 2cca794367
commit b8350e9c41

View File

@ -118,6 +118,8 @@ class BaseHandler(HandlerInterface):
if pos != -1:
cmd = cmd[:pos]
self._global_callback(client, command)
if cmd not in self._CMD_CALLBACK_DICT:
# 只有第一次遇到未知cmd时打日志
if cmd not in logged_unknown_cmds:
@ -129,8 +131,6 @@ class BaseHandler(HandlerInterface):
if callback is not None:
callback(self, client, command)
self._global_callback(client, command)
def _global_callback(self, client: ws_base.WebSocketClientBase, message: dict):
pass