mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
fix(dm): use discovered path from PATH event for delivery route
When PATH_UPDATE confirms delivery, use the actual path from the event data instead of the empty path_desc from _retry_context (which is empty during FLOOD phase). This captures the route firmware discovered via the flood delivery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -785,17 +785,18 @@ class DeviceManager:
|
||||
'dm_id': dm_id,
|
||||
'route_type': 'PATH_FLOOD',
|
||||
}, namespace='/chat')
|
||||
# Store delivery info from retry context
|
||||
# Store delivery info — use path from PATH event (actual discovered route)
|
||||
ctx = self._retry_context.pop(dm_id, None)
|
||||
discovered_path = data.get('path', '')
|
||||
if ctx:
|
||||
self.db.update_dm_delivery_info(
|
||||
dm_id, ctx['attempt'], ctx['max_attempts'], ctx['path'])
|
||||
dm_id, ctx['attempt'], ctx['max_attempts'], discovered_path)
|
||||
if self.socketio:
|
||||
self.socketio.emit('dm_delivered_info', {
|
||||
'dm_id': dm_id,
|
||||
'attempt': ctx['attempt'],
|
||||
'max_attempts': ctx['max_attempts'],
|
||||
'path': ctx['path'],
|
||||
'path': discovered_path,
|
||||
}, namespace='/chat')
|
||||
# Cancel retry task — delivery already confirmed
|
||||
task = self._retry_tasks.get(dm_id)
|
||||
|
||||
Reference in New Issue
Block a user