Skip to content

Commit

Permalink
fix: Fix receiver shutting down and reset messages displaying incorre…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
driskell committed Apr 12, 2023
1 parent 36bc467 commit 4d7c873
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lc-lib/transports/tcp/receivertcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ func (t *receiverTCP) controllerRoutine() {
break
}

log.Errorf("[R %s] Receiver error, resetting: %s", t.listen, err)
log.Errorf("[R %s] Receiver error, resetting: %s", t.bind, err)

if t.retryWait() {
break
}
}

// Request all connections to stop receiving and wait for them to finally close once the final ack is sent and nil message sent
log.Infof("[R %s] Receiver shutting down and waiting for final acknowledgements to be sent", t.listen)
log.Infof("[R %s] Receiver shutting down and waiting for final acknowledgements to be sent", t.bind)
t.connMutex.Lock()
for _, conn := range t.connections {
t.ShutdownConnectionRead(conn.ctx, fmt.Errorf("exiting"))
Expand All @@ -90,7 +90,7 @@ func (t *receiverTCP) controllerRoutine() {
// Ensure resources are cleaned up for the context
t.shutdownFunc()

log.Infof("[R %s] Receiver exiting", t.listen)
log.Infof("[R %s] Receiver exiting", t.bind)
}

// retryWait waits the backoff timeout before attempting to listen again
Expand Down

0 comments on commit 4d7c873

Please sign in to comment.