lua
lua copied to clipboard
cc.net.SocketTCP dispatch huge close event
There are 3 schedulers only create but not release on right way! So,if reconnected over 3 times then huge SocketTCP.EVENT_CLOSED event will be sended! Not onley SocketTCP.EVENT_CLOSE, also EVENT_CONNECT_FAILURE. So if modify this file,it works good. self.connectTimeTickScheduler = scheduler.scheduleGlobal(__connectTimeTick, SOCKET_TICK_TIME) add one raw code like this: if self.connectTimeTickScheduler then scheduler.unscheduleGlobal(self.connectTimeTickScheduler) self.connectTimeTickScheduler = nil end