Hello! I'm currently working on a app that needs to access the internet.
I'm using the addon first to "ping" a server to see if there's network connection available. This is done in a separate thread.
But one in a while, the app terminates with a segmentation fault. I done a backtrace using gdb, but no result other than 1 stack was found. Maybe I'm doing some errors, so I would like to know if these calls can be handled in a separate thread.
Here is the coude:
ConnectionHandler.h
class ConnectionHandler : public ofThread
{
public:
ConnectionHandler();
void setup(ConfigurationManager *config);
void threadedFunction();
bool pingServer();
bool isConnected();
private:
ConfigurationManager *config;
std::map<std::string, std::string> headers;
ofxHTTP::ClientSessionSettings sessionSettings;
bool connected;
long sleepTime;
};
Hello! I'm currently working on a app that needs to access the internet. I'm using the addon first to "ping" a server to see if there's network connection available. This is done in a separate thread. But one in a while, the app terminates with a segmentation fault. I done a backtrace using gdb, but no result other than 1 stack was found. Maybe I'm doing some errors, so I would like to know if these calls can be handled in a separate thread.
Here is the coude:
ConnectionHandler.h
ConnectionHandler.cpp
Thank you very much for your help! I'm testing this for days but cannot resolve it :S