Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed May 28, 2015
1 parent 10042df commit ae2244f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trunk/src/core/dlp_core_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ int DlpProxyConnection::proxy(st_netfd_t srs)
}

// wait for thread to start.
while (!rc.cycle) {
st_usleep(100 * 1000);
while (!rc.cycle || rc.terminated) {
st_usleep(30 * 1000);
}

DlpStSocket skt_client(stfd);
Expand All @@ -187,7 +187,7 @@ int DlpProxyConnection::proxy(st_netfd_t srs)
char buf[4096];
while (!rc.terminated) {
ssize_t nread = 0;
if ((ret = skt_srs.read(buf, 1024, &nread)) != ERROR_SUCCESS) {
if ((ret = skt_srs.read(buf, 4096, &nread)) != ERROR_SUCCESS) {
return ret;
}
dlp_assert(nread > 0);
Expand All @@ -204,7 +204,7 @@ int DlpProxyConnection::proxy(st_netfd_t srs)

// wait for thread to quit.
while (!rc.terminated) {
st_usleep(100 * 1000);
st_usleep(120 * 1000);
}

return ret;
Expand Down

0 comments on commit ae2244f

Please sign in to comment.