Merge pull request #44 from johnoliver/master

Close old sockets preventing file handle leaks