skttl / umbraco-unversion

A content un-versioning package for Umbraco 8.4+
https://our.umbraco.org/projects/website-utilities/unversion/
MIT License
13 stars 10 forks source link

Connection leak issues #11

Closed Shazwazza closed 6 years ago

Shazwazza commented 7 years ago

This project is using a custom SQL Connection which isn't quite ideal but will still work, however since there are no using clauses or try/finally clauses it means that if any exceptions occur during any of the logic in https://github.com/umco/umbraco-unversion/blob/develop/src/Our.Umbraco.UnVersion/Services/UnVersionService.cs before any reader, command or connection is actually closed.

Further to this, no IDbCommands are actually disposed of.

kimpil commented 6 years ago

Believe I made a fix for this back in 2015 in pull request 1. As far as I can tell this was removed again in a later commit.

@Developers would you like me to take a look at this and do another pull request? Was the original fix removed because you found a bug in it?

mattbrailsford commented 6 years ago

Oops, didn't realise that had changed. Would be more than happy for you to take a look again at a PR. I don't think there was a specific reason it was removed, probably just a mistake.

mattbrailsford commented 6 years ago

Fixed in 5d883d2