summaryrefslogtreecommitdiff
path: root/ace/TP_Reactor.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-03 21:50:06 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-03 21:50:06 +0000
commit613ffa69f8d9a21d66da4fc7f60d5949dcf2cfc3 (patch)
treed54c299db3eedf1df8dc86e0d6b3a8d579daaf79 /ace/TP_Reactor.cpp
parent395e4d9477b999ac897ca5626fa9871ad8897374 (diff)
downloadATCD-613ffa69f8d9a21d66da4fc7f60d5949dcf2cfc3.tar.gz
Thu Aug 3 21:49:27 UTC 2006 Carlos O'Ryan <coryan@atdesk.com>fix_bug_2540
Diffstat (limited to 'ace/TP_Reactor.cpp')
-rw-r--r--ace/TP_Reactor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp
index 1207cd7c93b..6773bf72ada 100644
--- a/ace/TP_Reactor.cpp
+++ b/ace/TP_Reactor.cpp
@@ -255,6 +255,10 @@ ACE_TP_Reactor::dispatch_i (ACE_Time_Value *max_wait_time,
int event_count =
this->get_event_for_dispatching (max_wait_time);
+ // We use this count to detect potential infinite loops as described
+ // in bug 2540.
+ int initial_event_count = event_count;
+
int result = 0;
// Note: We are passing the <event_count> around, to have record of
@@ -310,8 +314,14 @@ ACE_TP_Reactor::dispatch_i (ACE_Time_Value *max_wait_time,
if (event_count > 0)
{
// Handle socket events
- return this->handle_socket_events (event_count,
- guard);
+ result = this->handle_socket_events (event_count,
+ guard);
+ }
+
+ if (event_count != 0
+ && event_count == initial_event_count)
+ {
+ this->state_changed_ = true;
}
return 0;