summaryrefslogtreecommitdiff
path: root/tests/IOStream_Test.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-23 03:28:08 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-23 03:28:08 +0000
commit5b19bd39078f0022ad69d663005e6418cd9c2692 (patch)
treea6e22ab1ea1d23d8ad307498c260fee77e6bf6ba /tests/IOStream_Test.cpp
parent8da1d9ab41fdf4a36d40c5c09e3b0f63000687ab (diff)
downloadATCD-5b19bd39078f0022ad69d663005e6418cd9c2692.tar.gz
(server): break out of while loop if read from client_handler fails.
Diffstat (limited to 'tests/IOStream_Test.cpp')
-rw-r--r--tests/IOStream_Test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp
index b36edde21e2..6e47d930701 100644
--- a/tests/IOStream_Test.cpp
+++ b/tests/IOStream_Test.cpp
@@ -313,7 +313,8 @@ server (void *arg = 0)
while (client_handler &&
(buf.length() == 0 || buf[buf.length() - 1] != '"'))
{
- client_handler >> buf;
+ if (!(client_handler >> buf))
+ break;
if (buf.length() > 0)
ACE_DEBUG ((LM_DEBUG, "%s ", buf.c_str()));
@@ -329,7 +330,8 @@ server (void *arg = 0)
while (ACE_OS::strlen (buf) == 0
|| buf[ACE_OS::strlen (buf) - 1] != '"')
{
- client_handler >> buf;
+ if (!(client_handler >> buf))
+ break;
ACE_DEBUG ((LM_DEBUG, "%s ", buf));
}