Make the onOpen call reliable, e.g always make sure it gets called once the reconnect occured