summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-29 23:37:01 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-29 23:37:01 +0000
commit96415646274d6e42947271ff7a01d0b6db8fedb9 (patch)
tree14ad9a56a5ab8b0eb6addb1ab5b1757989fdcf68
parent6a8f323e3910f74bdb7d66df6c11ba07f894d74b (diff)
downloadATCD-96415646274d6e42947271ff7a01d0b6db8fedb9.tar.gz
Added code to close down logger connection.
-rw-r--r--netsvcs/clients/Logger/indirect_logging.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/netsvcs/clients/Logger/indirect_logging.cpp b/netsvcs/clients/Logger/indirect_logging.cpp
index 6a0698e1c90..ea80c890322 100644
--- a/netsvcs/clients/Logger/indirect_logging.cpp
+++ b/netsvcs/clients/Logger/indirect_logging.cpp
@@ -31,5 +31,17 @@ main (int argc, char *argv[])
}
ACE_DEBUG ((LM_SHUTDOWN, "closing down the test\n"));
+
+#if defined (ACE_WIN32)
+ // !!Important, Winsock is broken in that if you don't close
+ // down the connection before exiting main, you'll lose data.
+ // More over, your server might get "Access Violation" from
+ // within Winsock functions.
+
+ // Here we close down the connection to Logger by redirecting
+ // the logging destination back to stderr.
+ ACE_LOG_MSG->open (0, ACE_Log_Msg::STDERR, 0);
+#endif /* ACE_WIN32 */
+
return 0;
}