Safely close TLS connections.
Catch IOExceptions only when closing connections.
Merge pull request #13 from bitonic/master

Catch the right amount of exceptions when closing connections.