-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a data race between Conn creation and its automatic closing
`go test -race .` detects a data race when a Conn instance is automatically closed when the provided context's deadline is missed. Fix the data race by launching the corresponding goroutine only after all Conn's fields had been initialized.
- Loading branch information
1 parent
8e438d3
commit e3cfec0
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters