Close correct SSL connection on error

This fixes core dumps that occur occasionally when using an unstable
connection. See issue #47 for details.

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>