socket: shutdown(2) before close