diff options
Diffstat (limited to 'cpp/demo/IceStorm/clock/Publisher.cpp')
-rw-r--r-- | cpp/demo/IceStorm/clock/Publisher.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/demo/IceStorm/clock/Publisher.cpp b/cpp/demo/IceStorm/clock/Publisher.cpp index ce0df4ab6f4..0586cabab56 100644 --- a/cpp/demo/IceStorm/clock/Publisher.cpp +++ b/cpp/demo/IceStorm/clock/Publisher.cpp @@ -130,13 +130,14 @@ Publisher::run(int argc, char* argv[]) { publisher = publisher->ice_oneway(); } - + ClockPrx clock = ClockPrx::uncheckedCast(publisher); cout << "publishing tick events. Press ^C to terminate the application." << endl; try { - while(true) + bool stop = false; + while(!stop) { clock->tick(IceUtil::Time::now().toDateTime()); IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); |