Skip to content

Commit

Permalink
avoid scenario where node will never become healthy again
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Sep 24, 2024
1 parent c2a9566 commit 2eec45d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/info/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,14 @@ func (c *ioClient) CreateEgress(ctx context.Context, info *livekit.EgressInfo) c

if err != nil {
logger.Errorw("failed to create egress", err)
if errors.Is(err, psrpc.ErrRequestTimedOut) && c.healthy.Swap(false) {
logger.Infow("io connection unhealthy")
}
errChan <- err
return
} else if !c.healthy.Swap(true) {
logger.Infow("io connection restored")
}

if e.pending != nil {
c.updates <- e.pending
}

errChan <- nil
}()

Expand Down

0 comments on commit 2eec45d

Please sign in to comment.