support websocket close callback, related to araqne/issue#62