|
@@ -522,7 +522,7 @@ us.login = function (requset, response, userid, pageid, username, type) {
|
|
|
/**
|
|
|
* 用户下线,清理用户的数据
|
|
|
*/
|
|
|
-us.deluser = function (pageid) {
|
|
|
+us.deluser = function (userid, pageid) {
|
|
|
|
|
|
var i, j, z; //定义循环变量
|
|
|
var _userid, _fileid, _message, _docinfo, _messageinfo,
|
|
@@ -594,7 +594,7 @@ us.offLine = function () {
|
|
|
console.log(_user[j].response.connection.destroyed)
|
|
|
//判断用户已下线
|
|
|
if (_user[j].response.connection.destroyed) {
|
|
|
- us.deluser(j); //删除用户的数据
|
|
|
+ us.deluser(i, j); //删除用户的数据
|
|
|
delete _user[j]
|
|
|
}
|
|
|
}
|