close socket after receiving closeSecureChannel message