diff options
-rw-r--r-- | syncClientSocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp index ab765db..e6c8761 100644 --- a/syncClientSocket.cpp +++ b/syncClientSocket.cpp @@ -47,9 +47,9 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) std::cout << buf[index]; iss_ << buf[index]; } - while (1) + while (iss_.good()) { - if(missing_chars==-1 && iss_.good() && iss_.str().size()>5) + if(missing_chars==-1 && iss_.str().size()>5) { char * buffer = new char [6]; iss_.read(buffer,6); |