Skip to content

Commit

Permalink
Merge pull request #3 from basil-eldho/fix-resource-leak
Browse files Browse the repository at this point in the history
  • Loading branch information
becheran authored Jan 31, 2023
2 parents 402f2b9 + ed42b89 commit 6faeed2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*.so
*.dylib

# IDE related
.idea

# Test binary, built with `go test -c`
*.test

Expand Down
3 changes: 2 additions & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ func (client *Client) Run(terminate chan<- error, routineUpdate chan<- []model.G
terminate <- fmt.Errorf("Failed to list go routines. Err: %s", err.Error())
return
}
defer resp.Body.Close()

goroutines, err := model.ParseStackFrame(resp.Body)
if err != nil {
log.Printf("Error while parsing stack: %s", err.Error())
} else {
routineUpdate <- goroutines
}

resp.Body.Close()
<-ticker.C
}
}

0 comments on commit 6faeed2

Please sign in to comment.