Deal with OnUnexpectedClose just like OnClose for now, see #1729