vue-native-websocket-vue3插件,断网后过了2分钟左右才推送连接错误

websoket配置如下:

//main.ts

import VueNativeSock from 'vue-native-websocket-vue3'
import * as types from './store/mutation-types/socket'
import App from './App.vue'

const muconst app = createApp(App)
tations = {
  0: types.SOCKET_ONOPEN,
  1: types.SOCKET_ONCLOSE,
  2: types.SOCKET_ONERROR,
  3: types.SOCKET_ONMESSAGE,
  4: types.SOCKET_RECONNECT,
  5: types.SOCKET_RECONNECT_ERROR
}
app.use(VueNativeSock,url, {
  store,
  mutations,
  reconnection: true,
  connectManually: true,
  reconnectionDelay: 5000
})

 

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 以帮助更多的人 ^-^