Add close callback for websocket clients