fix cross domain bug when disconnect

fix cross domain bug when disconnect