sendSocketMessage:fail fail:send wcwss return fail
{"errMsg":"sendSocketMessage:fail fail:send wcwss return fail code:-1"} 最近websocket老是出现错误,代码很简单,如下,上面是错误信息 socket = wx.connectSocket(info);
socket.onOpen(...);
socket.onError: (res) => {
log.error("WS onFail - 2,", res)
console.log("WS onFail - 2,", res)
wx.showModal({
title: '网络错误',
content: '打开消息服务失败,是否重试?',
success: (res) => {
if (res.confirm) {
wx.reLaunch({
url: "/" + url.getCurrentPageUrlWithArgs()
})
}
}
})
}
})