attempt to fix crash of irc client on exit

This commit is contained in:
Mark Vejvoda
2013-05-15 00:45:34 +00:00
parent 280a00dc35
commit dbd26de28f
4 changed files with 142 additions and 23 deletions

View File

@@ -58,6 +58,8 @@ protected:
static const char *globalCacheContainerName;
std::vector<string> argv;
Mutex mutexIRCSession;
irc_session_t *ircSession;
string execute_cmd_onconnect;
@@ -79,6 +81,8 @@ protected:
bool wantToLeaveChannel;
int irc_run_session(irc_session_t * session);
public:
IRCThread(const std::vector<string> &argv,IRCCallbackInterface *callbackObj);

View File

@@ -50,6 +50,20 @@ using namespace Shared::PlatformCommon;
namespace Shared { namespace Platform {
#ifdef WIN32
#define PLATFORM_SOCKET_TRY_AGAIN WSAEWOULDBLOCK
#define PLATFORM_SOCKET_INPROGRESS WSAEINPROGRESS
#define PLATFORM_SOCKET_INTERRUPTED WSAEWOULDBLOCK
#else
#define PLATFORM_SOCKET_TRY_AGAIN EAGAIN
#define PLATFORM_SOCKET_INPROGRESS EINPROGRESS
#define PLATFORM_SOCKET_INTERRUPTED EINTR
#endif
// The callback Interface used by the UPNP discovery process
class FTPClientValidationInterface {
public:
@@ -137,6 +151,10 @@ public:
Socket();
virtual ~Socket();
static int getLastSocketError();
static const char * getLastSocketErrorText(int *errNumber=NULL);
static string getLastSocketErrorFormattedText(int *errNumber=NULL);
static bool disableNagle;
static int DEFAULT_SOCKET_SENDBUF_SIZE;
static int DEFAULT_SOCKET_RECVBUF_SIZE;