mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug with motd crashing stats
This commit is contained in:
parent
35334f010b
commit
32852c00b9
@ -453,7 +453,7 @@ class TasksManager:
|
||||
'players': srv['raw_ping_result'].get('players'),
|
||||
'desc': srv['raw_ping_result'].get('desc'),
|
||||
'version': srv['raw_ping_result'].get('version'),
|
||||
'icon': srv['raw_ping_result'].get('icon')
|
||||
'icon': None
|
||||
})
|
||||
if len(websocket_helper.clients) > 0:
|
||||
websocket_helper.broadcast_user_page_params(
|
||||
@ -478,7 +478,7 @@ class TasksManager:
|
||||
'players': srv['raw_ping_result'].get('players'),
|
||||
'desc': srv['raw_ping_result'].get('desc'),
|
||||
'version': srv['raw_ping_result'].get('version'),
|
||||
'icon': srv['raw_ping_result'].get('icon')
|
||||
'icon': None
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -77,10 +77,7 @@ class WebSocketHelper:
|
||||
|
||||
def broadcast_with_fn(self, filter_fn, event_type: str, data):
|
||||
clients = list(filter(filter_fn, self.clients))
|
||||
try:
|
||||
logger.debug(f"Sending to {len(clients)} out of {len(self.clients)} clients: {json.dumps({'event': event_type, 'data': data})}")
|
||||
except:
|
||||
logger.debug("Our logging statement actually just farted line 83 websocket helper.")
|
||||
|
||||
for client in clients:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user