Skip to content

Conversation

@jaer-tsun
Copy link
Contributor

What this PR does / why we need it:
Closing response bodies to prevent socket exhaustion.

return err
}

defer res.Body.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need to Close sockets multiple times, you should give those res different names. Even though they're pointers & should work fine, it will still cause confusion.

@saiyan86 saiyan86 merged commit c22b4da into Azure:master May 31, 2018
@jaer-tsun jaer-tsun deleted the fix-socket-leak branch June 5, 2018 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants