Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

Commit 8f4a0db

Browse files
committed
Fixing my mistakes, because I had a lapse in judgement...
Fix compilation errors in main.go and dxcc client - Corrected a syntax error in spotAggregator. - Fixed incorrect dbClient access in lotw.Client. - Updated dxcc.Client Close method to return an error.
1 parent 213abb3 commit 8f4a0db

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

backend/dxcc/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,14 @@ func NewClient(ctx context.Context, cfg config.Config, dbClient db.DBClient) (*C
234234
}
235235

236236
// Close gracefully shuts down the DXCC client's resources.
237-
func (c *Client) Close() {
237+
func (c *Client) Close() error {
238238
if c.updateStop != nil {
239239
close(c.updateStop)
240240
<-c.updateDone
241241
c.updateStop = nil
242242
c.updateDone = nil
243243
}
244+
return c.dbClient.Close()
244245
}
245246

246247
// createTables creates the DXCC tables if they don't exist.

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func RunApplication(ctx context.Context, args []string) int {
133133
// Perform cleanup for clients that were not closed by gracefulShutdown
134134
logging.Info("Performing final client cleanup...")
135135
lotwClient.StopUpdater()
136-
if err := lotwClient.dbClient.Close(); err != nil {
136+
if err := lotwClient.DbClient.Close(); err != nil {
137137
logging.Error("Error closing LoTW DB client: %v", err)
138138
}
139139
if err := dxccClient.Close(); err != nil {
@@ -544,7 +544,6 @@ func spotAggregator(ctx context.Context, spotChannels []<-chan spot.Spot, cache
544544
logging.Debug("Aggregator added enhanced spot from %s (spotter=%s)", enhancedSpot.Source, enhancedSpot.Spotter)
545545
}
546546
}
547-
}
548547
}
549548
}
550549

0 commit comments

Comments
 (0)