mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
parent
d42d8be78f
commit
f98d59fc82
@ -162,8 +162,7 @@ TimerManager::~TimerManager() {
|
||||
try {
|
||||
stop();
|
||||
} catch (...) {
|
||||
throw;
|
||||
// uhoh
|
||||
// We're really hosed.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ static const uint8_t kJSONObjectStart = '{';
|
||||
static const uint8_t kJSONObjectEnd = '}';
|
||||
static const uint8_t kJSONArrayStart = '[';
|
||||
static const uint8_t kJSONArrayEnd = ']';
|
||||
static const uint8_t kJSONNewline = '\n';
|
||||
static const uint8_t kJSONPairSeparator = ':';
|
||||
static const uint8_t kJSONElemSeparator = ',';
|
||||
static const uint8_t kJSONBackslash = '\\';
|
||||
|
@ -1436,8 +1436,8 @@ bool TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn) {
|
||||
}
|
||||
|
||||
fd_set wfds, efds;
|
||||
int ret = -1;
|
||||
int kSize = sizeof(conn);
|
||||
long ret = -1;
|
||||
long kSize = sizeof(conn);
|
||||
const char* pos = (const char*)const_cast_sockopt(&conn);
|
||||
|
||||
while (kSize > 0) {
|
||||
@ -1445,7 +1445,7 @@ bool TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn) {
|
||||
FD_ZERO(&efds);
|
||||
FD_SET(fd, &wfds);
|
||||
FD_SET(fd, &efds);
|
||||
ret = select(fd + 1, NULL, &wfds, &efds, NULL);
|
||||
ret = select(static_cast<int>(fd + 1), NULL, &wfds, &efds, NULL);
|
||||
if (ret < 0) {
|
||||
return false;
|
||||
} else if (ret == 0) {
|
||||
|
@ -224,7 +224,7 @@ void TServerFramework::newlyConnectedClient(const boost::shared_ptr<TConnectedCl
|
||||
// Count a concurrent client added.
|
||||
Synchronized sync(mon_);
|
||||
++clients_;
|
||||
hwm_ = std::max(hwm_, clients_);
|
||||
hwm_ = (std::max)(hwm_, clients_);
|
||||
}
|
||||
|
||||
void TServerFramework::disposeConnectedClient(TConnectedClient* pClient) {
|
||||
|
@ -700,7 +700,7 @@ void TSocket::setLinger(bool on, int linger) {
|
||||
#ifndef _WIN32
|
||||
struct linger l = {(lingerOn_ ? 1 : 0), lingerVal_};
|
||||
#else
|
||||
struct linger l = {(lingerOn_ ? 1 : 0), static_cast<u_short>(lingerVal_)};
|
||||
struct linger l = {static_cast<u_short>(lingerOn_ ? 1 : 0), static_cast<u_short>(lingerVal_)};
|
||||
#endif
|
||||
|
||||
int ret = setsockopt(socket_, SOL_SOCKET, SO_LINGER, cast_sockopt(&l), sizeof(l));
|
||||
|
@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <thrift/thrift-config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
Loading…
Reference in New Issue
Block a user