summaryrefslogtreecommitdiff
path: root/ace/SOCK_Stream.i
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-26 20:19:46 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-26 20:19:46 +0000
commit18beb4810892e6204f425273ba5032a735d3aa12 (patch)
treee8a286aa6a2edc05be8c1496d9b5c29cb50ddffb /ace/SOCK_Stream.i
parente8a5720d9043e8b43edde94cfa663c2329b59ac5 (diff)
downloadATCD-18beb4810892e6204f425273ba5032a735d3aa12.tar.gz
Moved checking for invalid handle from SOCK_Stream::close to
SOCK_Stream::close_writer and SOCK_Stream::close_reader.
Diffstat (limited to 'ace/SOCK_Stream.i')
-rw-r--r--ace/SOCK_Stream.i10
1 files changed, 8 insertions, 2 deletions
diff --git a/ace/SOCK_Stream.i b/ace/SOCK_Stream.i
index d916914da4a..93a35ad219d 100644
--- a/ace/SOCK_Stream.i
+++ b/ace/SOCK_Stream.i
@@ -11,7 +11,10 @@ inline int
ACE_SOCK_Stream::close_reader (void)
{
ACE_TRACE ("ACE_SOCK_Stream::close_reader");
- return ACE_OS::shutdown (this->get_handle (), 0);
+ if (this->get_handle () != ACE_INVALID_HANDLE)
+ return ACE_OS::shutdown (this->get_handle (), 0);
+ else
+ return 0;
}
// Shut down just the writing end of a ACE_SOCK.
@@ -20,7 +23,10 @@ inline int
ACE_SOCK_Stream::close_writer (void)
{
ACE_TRACE ("ACE_SOCK_Stream::close_writer");
- return ACE_OS::shutdown (this->get_handle (), 1);
+ if (this->get_handle () != ACE_INVALID_HANDLE)
+ return ACE_OS::shutdown (this->get_handle (), 1);
+ else
+ return 0;
}
inline ssize_t