-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
Description
Checklist
- This is not a question or a support request. If you have any boost related questions, please ask in the discussion forum.
- This is not a new feature or enhancement request. If it is, please open a new idea discussion instead. New feature and enhancement requests would be entertained by the boost team after a thorough discussion only.
- I have searched on the issue tracker and the discussion forum, and there is no existing related issue or discussion.
- I am running the
Latest release
, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these. - I did not make any code changes to boost.
Boost component
- boost daemon - storage providers
- boost client
- boost UI
- boost data-transfer
- boost index-provider
- Other
Boost Version
boost --version
boost version 1.6.0-rc1+git.739d7bb
Describe the Bug
I wanted to send deals concurrently, so i reused the "dealDCmdAction" function in the deal_cmd file(without modifying any code inside it).
The pseudocode is as follows:
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
defer wg.Done()
dealCmdAction()
}()
}
wg.Wait()
After run program, only the first few orders send to the same sp were successful, and the rest failed.
Then, i added the following code to "dealCmdAction",
Line 133 in a4a9bfb
defer n.Host.Close()
This solved the problem. What happened?
Logging Information
As above
Repo Steps
As above
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done