Skip to content

Fix intermittent panic in Close from test scenarios - #241

Merged
EnriqueL8 merged 1 commit into
mainfrom
fix-webhook-close
Sep 1, 2026
Merged

Fix intermittent panic in Close from test scenarios#241
EnriqueL8 merged 1 commit into
mainfrom
fix-webhook-close

Conversation

@peterbroadhurst

Copy link
Copy Markdown
Contributor

In chain with #240

In use of this library with the background connection option, we have intermittent panics in unit tests during cleanup as so due to management of the Close function not using a mutex:

goroutine 69 [running]:
github.com/hyperledger-firefly/common/pkg/wsclient.(*wsClient).Close(0x2438b0455d00)
	/home/runner/go/pkg/mod/github.com/hyperledger-firefly/common@v1.6.6-0.20260727155622-37f809c40b02/pkg/wsclient/wsclient.go:280 +0x63
github.com/hyperledger-firefly/common/pkg/wsclient.New.func1()
	/home/runner/go/pkg/mod/github.com/hyperledger-firefly/common@v1.6.6-0.20260727155622-37f809c40b02/pkg/wsclient/wsclient.go:200 +0x11d
created by github.com/hyperledger-firefly/common/pkg/wsclient.New in goroutine 68
	/home/runner/go/pkg/mod/github.com/hyperledger-firefly/common@v1.6.6-0.20260727155622-37f809c40b02/pkg/wsclient/wsclient.go:196 +0x80a

@peterbroadhurst
peterbroadhurst requested a review from a team as a code owner August 10, 2026 21:17

@EnriqueL8 EnriqueL8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Base automatically changed from limit-fixes to main September 1, 2026 09:17
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@EnriqueL8
EnriqueL8 merged commit 9f9d99d into main Sep 1, 2026
3 checks passed
@EnriqueL8
EnriqueL8 deleted the fix-webhook-close branch September 1, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants