Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关闭环信时,出现一个未定义异常,引起代码中断 #7

Closed
brotherhorse opened this issue Aug 15, 2015 · 1 comment
Closed

Comments

@brotherhorse
Copy link

TypeError: Cannot read property 'disconnect' of undefined
at connection.close (easemob.im-1.0.7.js:1348)
at Object.open (chatEasemobServices.js:229)
at Object.login (chatServices.js:282)

@pppkiller
Copy link
Contributor

Strophe.Websocket.prototype._closeSocket = function () { var me = this; if ( me.socket ) { setTimeout(function () { try { me.socket.close(); } catch ( e ) {} }, 0); } else { me.socket = null; } }
改写strophe的_closeSocket方法试试,添加上面代码就可以了, 我本地测试可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants