More precise close_notify handling