[PR #89] [MERGED] fix: avoid race conditions #201

Closed
opened 2026-02-28 14:26:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/89
Author: @aykevl
Created: 9/10/2024
Status: Merged
Merged: 9/10/2024
Merged by: @devgianlu

Base: masterHead: fix-ping-races


📝 Commits (1)

  • eca2de2 fix: avoid race conditions

📊 Changes

2 files changed (+18 additions, -4 deletions)

View changed files

📝 ap/ap.go (+8 -2)
📝 dealer/dealer.go (+10 -2)

📄 Description

These race conditions may seem harmless, and maybe they are unlikely to cause real trouble, but:

  1. There is a theoretical chance they do. A partially written time value in one goroutine may result in an invalid (and very wrong) time in another, leading to misbehaving code.
  2. They introduce noise, and make it more difficult to find&fix other race conditions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/devgianlu/go-librespot/pull/89 **Author:** [@aykevl](https://github.com/aykevl) **Created:** 9/10/2024 **Status:** ✅ Merged **Merged:** 9/10/2024 **Merged by:** [@devgianlu](https://github.com/devgianlu) **Base:** `master` ← **Head:** `fix-ping-races` --- ### 📝 Commits (1) - [`eca2de2`](https://github.com/devgianlu/go-librespot/commit/eca2de27c4e53490c657130c93eb1922bb279d9e) fix: avoid race conditions ### 📊 Changes **2 files changed** (+18 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `ap/ap.go` (+8 -2) 📝 `dealer/dealer.go` (+10 -2) </details> ### 📄 Description These race conditions may seem harmless, and maybe they are unlikely to cause real trouble, but: 1. There is a theoretical chance they do. A partially written time value in one goroutine may result in an invalid (and very wrong) time in another, leading to misbehaving code. 2. They introduce noise, and make it more difficult to find&fix other race conditions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:26:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#201
No description provided.