mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
fix(matrix): reset _device_id_unverified at start of connect()
Per review feedback on #53997 from @teknium1: the flag was set True on failed device_id resolution but never reset, so a same-adapter reconnect that successfully resolves a real device_id would keep skipping server-side key verification indefinitely. Reset now happens at the top of connect(), before resolution runs, so every connect() attempt starts clean. A repeat failure re-sets the flag (unchanged behavior); a recovery correctly clears it. Adds TestDeviceIdRecoveryOnReconnect to cover the transition.
This commit is contained in:
parent
9048457eab
commit
09dbe76955
2 changed files with 120 additions and 0 deletions
|
|
@ -1152,6 +1152,7 @@ class MatrixAdapter(BasePlatformAdapter):
|
|||
|
||||
async def connect(self, *, is_reconnect: bool = False) -> bool:
|
||||
"""Connect to the Matrix homeserver and start syncing."""
|
||||
self._device_id_unverified = False
|
||||
if self._client is not None:
|
||||
try:
|
||||
await self.disconnect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue