diff --git a/src/engine.js b/src/engine.js index f032549..0e8db0e 100644 --- a/src/engine.js +++ b/src/engine.js @@ -136,6 +136,9 @@ Engine.prototype.bindEvents = function() { } Engine.prototype.destroy = function() { + // 销毁的时候关闭socket + wx.closeSocket() + let sub while (sub = this.subs.shift()) { sub.destroy() }