Skip to content

Commit 048c7d8

Browse files
masenfclaude
andauthored
Remove redundant lost-and-found warning log (#6527)
* Remove redundant lost-and-found warning log The warning "Failed to send delta to lost and found for client" was duplicative — emit_lost_and_found already logs the underlying cause (either "Redis token owner not found" or "Redis error publishing lost and found delta") for both failure modes. The extra warning wasn't actionable and confused users. * Remove redundant Redis token owner not found warning This warning fired whenever a token wasn't registered in Redis, which can happen normally (e.g. expired tokens). It wasn't actionable and confused users. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent fbd85e3 commit 048c7d8

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

reflex/app.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,10 +1593,7 @@ async def emit_update(self, update: StateUpdate, token: str) -> None:
15931593
):
15941594
if isinstance(self._token_manager, RedisTokenManager):
15951595
# The socket belongs to another instance of the app, send it to the lost and found.
1596-
if not await self._token_manager.emit_lost_and_found(token, update):
1597-
console.warn(
1598-
f"Failed to send delta to lost and found for client {token!r}"
1599-
)
1596+
await self._token_manager.emit_lost_and_found(token, update)
16001597
else:
16011598
# If the socket record is None, we are not connected to a client. Prevent sending
16021599
# updates to all clients.

reflex/utils/token_manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ async def _get_token_owner(self, token: str, refresh: bool = False) -> str | Non
428428
self.token_to_socket[token] = socket_record
429429
self.sid_to_token[socket_record.sid] = token
430430
return socket_record.instance_id
431-
console.warn(f"Redis token owner not found for token {token}")
432431
except Exception as e:
433432
console.error(f"Redis error getting token owner: {e}")
434433
return None

0 commit comments

Comments
 (0)