mirror of https://github.com/axmolengine/axmol.git
Invoking WebSocket::closeAllConnection while reseting Director.
This commit is contained in:
parent
d122784ad4
commit
763559cd1e
|
@ -61,6 +61,7 @@ THE SOFTWARE.
|
|||
#include "base/CCConfiguration.h"
|
||||
#include "base/CCAsyncTaskPool.h"
|
||||
#include "platform/CCApplication.h"
|
||||
#include "network/WebSocket.h"
|
||||
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
#include "CCScriptSupport.h"
|
||||
|
@ -930,6 +931,9 @@ void Director::reset()
|
|||
_runningScene = nullptr;
|
||||
_nextScene = nullptr;
|
||||
|
||||
// Close all websocket connection. It has to be invoked before cleaning scheduler
|
||||
network::WebSocket::closeAllConnections();
|
||||
|
||||
// cleanup scheduler
|
||||
getScheduler()->unscheduleAll();
|
||||
|
||||
|
|
Loading…
Reference in New Issue