close socket after calling ssl_shutdown