Pass directly the AtmosphereResource instead of the Request
Remove this non sense
If an unexpected error happens during the onOpen, catch it and make sure no AtmosphereResource is left behind
Cleanup