From 9efd03df6f257fad78e345fccecab9fb4f35a8dd Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 25 May 2021 12:31:04 -0700 Subject: [PATCH] sidecar: only restart sidecar negotiator if ticket still active --- sidecar_acceptor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sidecar_acceptor.go b/sidecar_acceptor.go index 9e75b80..48f3abd 100644 --- a/sidecar_acceptor.go +++ b/sidecar_acceptor.go @@ -129,8 +129,8 @@ func (a *SidecarAcceptor) Start(errChan chan error) error { // If this ticket was intended to be negotiated in an automated // manner, then we'll launch a goroutine to manage the // remaining state transitions depending on if we're the - // provider of responder. - case ticket.Offer.Auto: + // provider or responder. + case ticket.Offer.Auto && ticket.State != sidecar.StateCompleted: // In order to determine our role, we'll first need to see // if the account for the offer exists in our database. If // not, then we're the recipient.