From 12fa45d4ac847a45a73d1410148bc89c9dbc6894 Mon Sep 17 00:00:00 2001 From: Adit Sachde <23707194+aditsachde@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:36:25 -0400 Subject: [PATCH] fix source of deadlock --- internal/ctsubmit/logic.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/ctsubmit/logic.go b/internal/ctsubmit/logic.go index 9273197..1f64a1f 100644 --- a/internal/ctsubmit/logic.go +++ b/internal/ctsubmit/logic.go @@ -170,7 +170,9 @@ func (d *stageZeroData) stageZero(ctx context.Context, reqBody io.ReadCloser, pr // Otherwise, we need to send it to the sequencer // Send the unsequenced entry to the first stage - returnPath := make(chan sunlight.LogEntry) + // This channel is buffered so it doesn't block if an attempt is made to send + // after the timeout fires. + returnPath := make(chan sunlight.LogEntry, 1) d.stageOneTx <- UnsequencedEntryWithReturnPath{entry, returnPath} // If we recieve something here, that means that the entry has been both sequenced