summaryrefslogtreecommitdiff
path: root/ruby/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-02-09 18:21:07 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-02-09 18:46:33 +0100
commit635f5c751237535b1e3e435d8330fcaa39a47f82 (patch)
treea7f04aa70e16f84c15c28730310ac4f8e8187a80 /ruby/src
parentICE-8648 - Make IceBridge usable as router-for-OA (diff)
downloadice-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.cpp14
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);