feat: integrate analytics and fragment receipt improvements

This commit is contained in:
hectorzhao
2026-08-03 15:34:41 +08:00
parent 3357ace7e1
commit 530a65de80
89 changed files with 1964 additions and 324 deletions
+3 -4
View File
@@ -130,10 +130,9 @@ func rememberDownstream(session downstreamSession) {
session.touchPresence("connected", true, false)
downstreamRegistry.Lock()
if existing := downstreamRegistry.byMessageID[session.messageID]; existing != nil && existing.conn == session.conn {
// A downstream long message returns one SUBMIT_RESP per fragment but is
// persisted as one platform message. Keep the first fragment Msg_Id so
// online delivery and restart recovery (which persists the first
// Sequence_Id) address the same client-side message.
// Keep a stable message-level lookup for the live connection. Receipt
// delivery no longer uses this value for long-message fragments; it
// reconstructs every fragment Msg_Id from that fragment's Sequence_Id.
session.gatewayMsgID = existing.gatewayMsgID
}
downstreamRegistry.byMessageID[session.messageID] = &session