From feb6dcdd3cf0f794566940e5286ce8508c3beeab Mon Sep 17 00:00:00 2001 From: "Dor.Katzelnick" Date: Thu, 23 Oct 2025 11:39:41 +0300 Subject: [PATCH] remove log that caused segmentation fault when connection was nil change order between initailizing the connections and starting the reconnection routine Signed-off-by: Dor.Katzelnick --- node/router/shard_router.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/node/router/shard_router.go b/node/router/shard_router.go index bb718ffb..b81746d1 100644 --- a/node/router/shard_router.go +++ b/node/router/shard_router.go @@ -152,8 +152,7 @@ func (sr *ShardRouter) maybeReconnectStream(connIndex int, streamInConnIndex int sr.lock.RUnlock() sr.logger.Debugf("Checking stream %d,%d that was reported", connIndex, streamInConnIndex) - // check the connection, and if it's bad - try to reconnect untill success - sr.logger.Debugf("connection %d has state %s", connIndex, conn.GetState()) + // check the connection, and if it's bad - try to reconnect until success if conn == nil || conn.GetState() == connectivity.Shutdown || conn.GetState() == connectivity.TransientFailure { if err = sr.reconnect(connIndex); err != nil { return err @@ -218,8 +217,8 @@ func (sr *ShardRouter) reconnect(connIndex int) error { func (sr *ShardRouter) MaybeInit() { sr.initConnPoolAndStreamsOnce() - sr.startReconnectionRoutineOnce() sr.maybeConnect() + sr.startReconnectionRoutineOnce() } func (sr *ShardRouter) maybeConnect() {