fix session disconnect for environment viewer in a very stupid way

we must need some kind of session shutdown event?