Test socket close shutdown.