Hold a pending hybrid responder locked until it is filled in

This commit is contained in:
JackDoan committed 2026-10-14 11:09:18 -05:00
1 parent 4ce04760ae
commit 70e7d3f2ea
1 file changed
+4
+4
View File
@@ -802,6 +802,10 @@ func (hm *HandshakeManager) beginHandshake(via ViaSender, packet []byte, h *head
startTime: time.Now(),
responder: &hybridResponder{},
}
// The index is visible to msg3 as soon as it is allocated, so hold the
// entry until it is filled in.
pending.Lock()
defer pending.Unlock()
allocIndex = func() (uint32, error) { return hm.allocateIndex(pending) }
}