Skip to content

Commit

Permalink
lock shared results list when accessing it
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Apr 25, 2012
1 parent 878b321 commit d354123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/FusionInventory/Agent/Task/NetInventory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ sub run {
delay(1);

# send results to the server
while (my $result = shift @results) {
while (my $result = do { lock @results; shift @results; }) {
my $data = {
DEVICE => $result,
MODULEVERSION => $VERSION,
Expand Down

0 comments on commit d354123

Please sign in to comment.