Skip to content

Commit

Permalink
fix(grpcconnector): Correctly disconnect dopplers (#623)
Browse files Browse the repository at this point in the history
Previously, implicit memory aliasing meant that we were only
disconnecting one doppler connection at a time. I'm unsure what the
exact impact of this bug was.
  • Loading branch information
ctlong authored Aug 23, 2023
1 parent 7f5c5c2 commit 10ee009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plumbing/grpc_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ func (c *GRPCConnector) handleFinderEvent(uris []string) {
}

for _, deadClient := range deadClients {
deadClient := deadClient

log.Printf("Disabling reconnects for doppler %s", deadClient.uri)
deadClient.disconnect = true

Expand Down
2 changes: 2 additions & 0 deletions src/rlp/internal/ingress/grpc_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ func (c *GRPCConnector) handleFinderEvent(uris []string) {
}

for _, deadClient := range deadClients {
deadClient := deadClient

log.Printf("Disabling reconnects for doppler %s", deadClient.uri)
deadClient.disconnect = true

Expand Down

0 comments on commit 10ee009

Please sign in to comment.