我也遇到了这个问题,close后需要隔一段时间才能重新watch,否则就会报错,我现在是通过设置等待时间解决的,但是需要等待的时间并不确定,设太大又影响体验,我现在是设置了半秒钟,如果这之后还发生错误就给用户报错,让他手动重新watch,希望官方把close后直到可以重新watch这段时间也算进close的运行时间内
watcher.close()关掉watch监听后再重新启动报错?the watch closed because of error Error: errCode: -402002 realtime listener init watch fail | errMsg: init watch fail Error: invalid state: ws connection not exists, can not send message history states: UNINIT-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(loginStart)->INIT_LOGGING_IN-(loginSuccess)->INIT_LOGGED_IN-(initWatchStart)->INIT_WATCH_PENDING-(initWatchFail)->INIT_WATCH_FAIL-(close)->CLOSED
2021-05-27