_.each(this.irc_channels, function (chan) {
chan.dispose();
});
- this.irc_users = null;
- this.irc_channels = null;
+ this.irc_users = undefined;
+ this.irc_channels = undefined;
+
+ this.server.dispose();
+ this.server = undefined;
EventBinder.unbindIrcEvents('', this.irc_events, this);
*/
IrcConnection.prototype.disposeSocket = function () {
if (this.socket) {
+ this.socket.end();
this.socket.removeAllListeners();
this.socket = null;
}