From 4ffb5c9d70f0c6f0884adbaa739049990458ec6f Mon Sep 17 00:00:00 2001 From: Przemyslaw Delewski <102958445+pdelewski@users.noreply.github.com> Date: Wed, 15 Jan 2025 17:08:51 +0100 Subject: [PATCH] Fixing race condition (#1190) --- quesma/v2/core/quesma_builder.go | 2 +- quesma/v2/core/quesma_pipeline.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quesma/v2/core/quesma_builder.go b/quesma/v2/core/quesma_builder.go index 6780cb7d9..da691fcdf 100644 --- a/quesma/v2/core/quesma_builder.go +++ b/quesma/v2/core/quesma_builder.go @@ -145,7 +145,7 @@ func (quesma *Quesma) buildInternal() (QuesmaBuilder, error) { if info.pipelineIndex == pipelineIndex && info.connIndex == connIndex { continue } - quesma.dependencies.Logger().Info().Msgf("Sharing frontend connector %v with %v", sharedFc.InstanceName(), conn.InstanceName()) + quesma.dependencies.Logger().Info().Msgf("Sharing frontend connector %p with %p", sharedFc, pipeline.GetFrontendConnectors()[connIndex]) pipeline.GetFrontendConnectors()[connIndex] = sharedFc } } diff --git a/quesma/v2/core/quesma_pipeline.go b/quesma/v2/core/quesma_pipeline.go index f8d85f682..6afc1aa33 100644 --- a/quesma/v2/core/quesma_pipeline.go +++ b/quesma/v2/core/quesma_pipeline.go @@ -70,7 +70,7 @@ func (p *Pipeline) Start() { // because we are copying routing table from all connectors // however, bind error remains for _, conn := range p.FrontendConnectors { - p.logger.Info().Msgf("Starting frontend connector %s", conn) + p.logger.Info().Msgf("Starting frontend connector %s", conn.GetEndpoint()) go conn.Listen() } }