smp-server: copy entity IDs out of received block (#1906)

This commit is contained in:
sh authored and GitHub committed 2026-10-08 15:28:38 +01:00
1 parent 8d81f775b1
commit 7754f8624e
2 files changed
+28 -2

No files matched your search

+3 -1
View File
@@ -2449,7 +2449,9 @@ tDecodeServer THandleParams {sessionId, thVersion = v, implySessId} = \case
where
cmdOrErr = parseProtocol @v @err @cmd v command >>= checkCredentials tAuth entityId
t :: a -> (CorrId, EntityId, a)
t = (corrId,entityId,)
-- IDs are slices of the ~16 KB received block and are kept as subscription keys,
-- so without a copy one live key retains the whole block
t = (CorrId $ B.copy $ bs corrId,EntityId $ B.copy $ unEntityId entityId,)
Left _ -> tError corrId PEBlock
| otherwise -> tError corrId PESession
Left _ -> tError "" PEBlock