Commit 2f737d48 by guanghui.cui

修复windows下超时失效问题

parent 1a566a9d
......@@ -194,7 +194,7 @@ void TCPClient::setSocketTimeout(int timeout)
{
#ifdef WIN32
int iTimeOut = timeout * 1000;
setsockopt(m_sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&iTimeOut, sizeof(iTimeOut));
setsockopt(m_sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&iTimeOut, sizeof(int));
#else
struct timeval vtime;
vtime.tv_sec = timeout;
......
......@@ -19,7 +19,7 @@
INITIALIZE_EASYLOGGINGPP
#define VERSION "1.0.6 beta 8" //版本号
#define VERSION "1.0.7" //版本号
std::string g_init_data;
std::string g_init_data_ods_back;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment