I realized that if I comment out all the code below I don't recieve that crush anymore.

if ( webSocket.connected && webSocket.dataAvailableForRead() )
{
    allData = webSocket.receiveText();
}


But if I only comment out

//allData = webSocket.receiveText();

It is still crushes .

It also does not crush if I use webSocket.waitForData(1.msecs) like:

if ( webSocket.waitForData(1.msecs) && webSocket.dataAvailableForRead() )
{
    allData = webSocket.receiveText();
}


But I don't want to keep my app block even for 1.msecs because I have 300 of this sockets.

Is there a better alternative for waitForData?

Kadir Erdem Demir