close
Uncaught TypeError: Cannot read property 'apply' of undefined.
because you callback mutiple
like
socket.on('userToUser', function(content, callback){
mysql.insertChat(content, function(err, data){
return callback({'result':'1'}) //first callback
})
sendToUser(content, function(errm successData){
return callback({'result':'success','chatid':content.chatid});
//second callback ->wrong
})
});
全站熱搜