华为荣耀9 socket 发送请求并收到返回消息后产生不明错误
连接socket成功后,通过SocketTask.send(OBJECT)方法发送请求,通过SocketTask.onMessage(CALLBACK)可以成功收到返回的数据,然后突然会出现 “undefined;at App sendSocketMessage function; at setTimeout callback function undefined;”,并同时出现"pthread_create(1040kb stack) fail:out of memery"。
//统一发送消息 sendSocketMessage: function (msg) { if (this.globalData.localSocket.readyState === 1) { try { this.globalData.localSocket.send({ data: JSON.stringify(msg) }) } catch(e) { console.log(e) } } else { socketMsgQueue.push(msg) } }, |
但app sendSocketMessage方法并没有调用setTimeout方法,而且暂时只有这部手机会出现这个问题,求官方解答
