If I declare an application scoped variable or object in application.cfc onApplicationStart(). When the application scope times out its now dead. I want that to persist one used for websockets but not all application variables.
What would be the best way to fire it up again.
function onApplicationStart(){
Application.objects.chat = WebsocketRegister("/ws/chat/{channel}", new ChatListener());
}
After some time I get :
The WebSocket session [x] has been closed and no method (apart from close()) may be called on a closed session when I try to broadcast to it.
Should I be using a NOT ISDEFINED("Application.objects.chat")
in application.cfc. Check if its there and reload it? Or is there a better way?
Thanks