Fix closing of SSL while negociation is not done.