Skip to content

Commit

Permalink
chore: verify if there is connection
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Oct 25, 2024
1 parent 205bdfa commit ad2c6a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion finality-provider/cmd/fpd/daemon/daemon_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func runCommandAddFinalitySig(cmd *cobra.Command, args []string) error {
return err
}
defer func() {
fmt.Printf("start to clean up")
fmt.Printf("\nstart to clean up")
if err := cleanUp(); err != nil {
fmt.Printf("Failed to clean up grpc client: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions finality-provider/service/client/rpcclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func NewFinalityProviderServiceGRpcClient(remoteAddr string) (client *FinalityPr
}

cleanUp = func() error {
if conn == nil {
return nil
}
return conn.Close()
}

Expand Down

0 comments on commit ad2c6a2

Please sign in to comment.