提交 5c18b159 编写于 作者: X xionglei6

init: fix bugs

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 045266c6
...@@ -243,10 +243,11 @@ void WatcherManager::RunLoop() ...@@ -243,10 +243,11 @@ void WatcherManager::RunLoop()
const int32_t RECV_BUFFER_MAX = 5 * 1024; const int32_t RECV_BUFFER_MAX = 5 * 1024;
std::vector<char> buffer(RECV_BUFFER_MAX, 0); std::vector<char> buffer(RECV_BUFFER_MAX, 0);
bool retry = false; bool retry = false;
ssize_t recvLen = 0;
while (!stop_) { while (!stop_) {
int fd = GetServerFd(retry); int fd = GetServerFd(retry);
if (fd >= 0) { if (fd >= 0) {
ssize_t recvLen = recv(fd, buffer.data(), RECV_BUFFER_MAX, 0); recvLen = recv(fd, buffer.data(), RECV_BUFFER_MAX, 0);
} }
if (stop_) { if (stop_) {
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册