diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-02-09 18:21:07 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-02-09 18:46:33 +0100 |
commit | 635f5c751237535b1e3e435d8330fcaa39a47f82 (patch) | |
tree | a7f04aa70e16f84c15c28730310ac4f8e8187a80 /ruby/src | |
parent | ICE-8648 - Make IceBridge usable as router-for-OA (diff) | |
download | ice-635f5c751237535b1e3e435d8330fcaa39a47f82.tar.bz2 ice-635f5c751237535b1e3e435d8330fcaa39a47f82.tar.xz ice-635f5c751237535b1e3e435d8330fcaa39a47f82.zip |
Fixed shutdown/isShutdown/waitForShutdown to no longer throw if communicator is destroyed (ICE-8659)
Diffstat (limited to 'ruby/src')
-rw-r--r-- | ruby/src/IceRuby/Communicator.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ruby/src/IceRuby/Communicator.cpp b/ruby/src/IceRuby/Communicator.cpp index e41a3bd9582..914a1d2a727 100644 --- a/ruby/src/IceRuby/Communicator.cpp +++ b/ruby/src/IceRuby/Communicator.cpp @@ -421,6 +421,19 @@ IceRuby_Communicator_isShutdown(VALUE self) extern "C" VALUE +IceRuby_Communicator_waitForShutdown(VALUE self) +{ + ICE_RUBY_TRY + { + Ice::CommunicatorPtr p = getCommunicator(self); + p->waitForShutdown(); + } + ICE_RUBY_CATCH + return Qnil; +} + +extern "C" +VALUE IceRuby_Communicator_stringToProxy(VALUE self, VALUE str) { ICE_RUBY_TRY @@ -740,6 +753,7 @@ IceRuby::initCommunicator(VALUE iceModule) rb_define_method(_communicatorClass, "destroy", CAST_METHOD(IceRuby_Communicator_destroy), 0); rb_define_method(_communicatorClass, "shutdown", CAST_METHOD(IceRuby_Communicator_shutdown), 0); rb_define_method(_communicatorClass, "isShutdown", CAST_METHOD(IceRuby_Communicator_isShutdown), 0); + rb_define_method(_communicatorClass, "waitForShutdown", CAST_METHOD(IceRuby_Communicator_waitForShutdown), 0); rb_define_method(_communicatorClass, "stringToProxy", CAST_METHOD(IceRuby_Communicator_stringToProxy), 1); rb_define_method(_communicatorClass, "proxyToString", CAST_METHOD(IceRuby_Communicator_proxyToString), 1); rb_define_method(_communicatorClass, "propertyToProxy", CAST_METHOD(IceRuby_Communicator_propertyToProxy), 1); |