Socket.io-client-cpp crashes after creating scene

I’m using GitHub - socketio/socket.io-client-cpp: C++11 implementation of Socket.IO client with cocos, because the built-in socket.io doesn’t support callback (Doesn't work with SocketIO 2.0.1 and failed calling back with old version? - #3 by amirrezam)

Everything is fine, until i want to push new scene after receiving server signal
Here is my code

SocIO::SocIO() {
	
	// client object
	_client = new sio::client();
	_client->connect("ws://localhost:3000");
       ....
       _client->socket()->on("joinedRoom", bind(&SocIO::joinedRoom, this, placeholders::_1));
}


void SocIO::joinedRoom(sio::event &a)
{
    Scene* newScene = PlaygroundScene::createScene(1); // crash on this line
}

I don’t know what happened here, didn’t get this error with built-in socket.io.
Is it because of threading?

Anyone can help?

I use built-in socket-io so never faced such problem, server side we use 1.4.8

Problem should be thread only, if you want to use 2.0.1 then you have to create separate class for all socket operations like inbuilt socket-io and use it with singleton.

built-in socket.io doesn’t support callback.
thank you, i’ll try to create separate class with singleton.