Skip to content

Commit

Permalink
Only close if unixServer is non-nil
Browse files Browse the repository at this point in the history
  • Loading branch information
hmahmood committed May 30, 2024
1 parent c61bbeb commit 626819a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/agent/subcommands/flare/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ func (c *commandTestSuite) SetupSuite() {

func (c *commandTestSuite) TearDownSuite() {
c.tcpServer.Close()
c.unixServer.Close()
if c.unixServer != nil {
c.unixServer.Close()
}
}

func (c *commandTestSuite) getPprofTestServer() (tcpServer *httptest.Server, unixServer *httptest.Server) {
Expand Down

0 comments on commit 626819a

Please sign in to comment.