-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use netMutex to protect dhcpLeases, pingResponse, and outSockets.
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 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
0360e50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a GO programmer but don't you need unlocks at the continues in icmpEchoSender()? Although, I don't see what you are protecting in the second for loop. Could you move the unlock up in between the two for loops?
0360e50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two "continue"s on line 503 and 507 are for the nested "for", and the lock/unlock are outside of that loop:
stratux/main/network.go
Line 492 in 0360e50
0360e50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. I had some lines collapsed and missed that. Thanks for commenting.