View Single Post
CepiPerez's Avatar
Posts: 1,023 | Thanked: 4,421 times | Joined on Feb 2010 @ Argentina
#464
@ceene:

About segmentation fault, please try this:

Code:
void Client::read()
{
    connectionMutex.lock();
    while (socket->bytesAvailable() > 0)
    {
        try {
            connection->read();
        }
        catch (IOException &e)
        {
            lastError = e.toString();
            Utilities::logData("read(): There was an IO Exception: " + lastError);
            connectionClosed();
            showStatus(lastError + " Retrying in 10 seconds..");
            break;
        }
        catch (ProtocolException &e)
        {
            lastError = e.toString();
            Utilities::logData("read(): There was a Protocol Exception: " + lastError);
            connectionClosed();
            showStatus("Protocol Exception. Retrying in 10 seconds...");
            break;
        }
    }

    connectionMutex.unlock();
}
__________________
Filebox / FileCase for Maemo / Harmattan / Sailfish
FlowPlayer for Maemo / Harmattan / Sailfish
Whatsup for Harmattan / Sailfish
CallBlocker for Harmattan

Support my work:
Paypal / Bitcoin
 

The Following 5 Users Say Thank You to CepiPerez For This Useful Post: