zeroc-ice 3.8.2 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +26 -9
  3. data/dist/IceRuby/Config.h +0 -12
  4. data/dist/IceRuby/Connection.cpp +18 -9
  5. data/dist/IceRuby/DefaultSliceLoader.h +1 -1
  6. data/dist/IceRuby/Endpoint.cpp +21 -8
  7. data/dist/IceRuby/Operation.cpp +7 -5
  8. data/dist/IceRuby/Properties.cpp +3 -4
  9. data/dist/IceRuby/Proxy.cpp +11 -19
  10. data/dist/IceRuby/RubySliceLoader.cpp +1 -1
  11. data/dist/IceRuby/RubySliceLoader.h +6 -0
  12. data/dist/IceRuby/Types.cpp +162 -138
  13. data/dist/IceRuby/Types.h +68 -28
  14. data/dist/IceRuby/Util.cpp +14 -78
  15. data/dist/IceRuby/Util.h +7 -17
  16. data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
  17. data/dist/ice/cpp/include/Ice/Config.h +2 -2
  18. data/dist/ice/cpp/include/Ice/Connection.h +24 -8
  19. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
  20. data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
  21. data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
  22. data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
  23. data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
  24. data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
  25. data/dist/ice/cpp/include/Ice/LocalExceptions.h +5 -5
  26. data/dist/ice/cpp/include/Ice/Logger.h +7 -0
  27. data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
  28. data/dist/ice/cpp/include/Ice/Object.h +10 -8
  29. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
  30. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
  31. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
  32. data/dist/ice/cpp/include/Ice/OutputStream.h +7 -6
  33. data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
  34. data/dist/ice/cpp/include/Ice/Properties.h +3 -3
  35. data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
  36. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
  37. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
  38. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
  39. data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
  40. data/dist/ice/cpp/include/Ice/Service.h +2 -5
  41. data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
  42. data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
  43. data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  44. data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
  45. data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
  46. data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
  47. data/dist/ice/cpp/include/Ice/UUID.h +1 -0
  48. data/dist/ice/cpp/include/Ice/Value.h +2 -2
  49. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
  50. data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
  51. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
  52. data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
  53. data/dist/ice/cpp/include/generated/Ice/Locator.h +50 -14
  54. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
  55. data/dist/ice/cpp/include/generated/Ice/Metrics.h +94 -39
  56. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
  57. data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
  58. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
  59. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
  60. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
  61. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +2 -2
  62. data/dist/ice/cpp/include/generated/Ice/Router.h +50 -14
  63. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
  64. data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
  65. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
  66. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
  67. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
  68. data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
  69. data/dist/ice/cpp/src/Ice/Base64.h +2 -2
  70. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
  71. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
  72. data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
  73. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +1 -1
  74. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
  75. data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
  76. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
  77. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
  78. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
  79. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
  80. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
  81. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +94 -99
  82. data/dist/ice/cpp/src/Ice/ConnectionI.h +11 -8
  83. data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
  84. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
  85. data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
  86. data/dist/ice/cpp/src/Ice/FileUtil.cpp +12 -12
  87. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
  88. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
  89. data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
  90. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
  91. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -3
  92. data/dist/ice/cpp/src/Ice/InputStream.cpp +23 -19
  93. data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
  94. data/dist/ice/cpp/src/Ice/Instance.h +1 -6
  95. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +1 -1
  96. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
  97. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
  98. data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
  99. data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
  100. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
  101. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
  102. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
  103. data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
  104. data/dist/ice/cpp/src/Ice/Network.h +12 -7
  105. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
  106. data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
  107. data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
  108. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
  109. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
  110. data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
  111. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
  112. data/dist/ice/cpp/src/Ice/OutputStream.cpp +4 -4
  113. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
  114. data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
  115. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
  116. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
  117. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
  118. data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
  119. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
  120. data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
  121. data/dist/ice/cpp/src/Ice/Random.h +6 -2
  122. data/dist/ice/cpp/src/Ice/Reference.cpp +22 -11
  123. data/dist/ice/cpp/src/Ice/Reference.h +3 -0
  124. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +10 -0
  125. data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
  126. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
  127. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
  128. data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
  129. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
  130. data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
  131. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
  132. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
  133. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +15 -1
  134. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
  135. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
  136. data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
  137. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
  138. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +130 -52
  139. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +64 -33
  140. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
  141. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +3 -3
  142. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
  143. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
  144. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
  145. data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
  146. data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
  147. data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
  148. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
  149. data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
  150. data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
  151. data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
  152. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
  153. data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
  154. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
  155. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
  156. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
  157. data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
  158. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
  159. data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
  160. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
  161. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
  162. data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
  163. data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
  164. data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
  165. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +4 -1
  166. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
  167. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
  168. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +96 -27
  169. data/dist/ice/cpp/src/Ice/WSTransceiver.h +1 -1
  170. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
  171. data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
  172. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
  173. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
  174. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
  175. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
  176. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
  177. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
  178. data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
  179. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
  180. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
  181. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
  182. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +2 -2
  183. data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
  184. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
  185. data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
  186. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
  187. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
  188. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
  189. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
  190. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
  191. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +26 -20
  192. data/dist/ice/cpp/src/Slice/DocCommentParser.h +2 -2
  193. data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
  194. data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
  195. data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
  196. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +10 -9
  197. data/dist/ice/cpp/src/Slice/Parser.cpp +28 -20
  198. data/dist/ice/cpp/src/Slice/Parser.h +3 -4
  199. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +3 -11
  200. data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -2
  201. data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
  202. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +197 -114
  203. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
  204. data/dist/ice/cpp/src/Slice/Util.h +21 -9
  205. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
  206. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +16 -12
  207. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +3 -3
  208. data/dist/ice/slice/Glacier2/Router.ice +3 -3
  209. data/dist/ice/slice/Ice/Metrics.ice +6 -5
  210. data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
  211. data/dist/ice/slice/IceGrid/Admin.ice +9 -9
  212. data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
  213. data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
  214. data/dist/lib/Glacier2/Metrics.rb +1 -1
  215. data/dist/lib/Glacier2/PermissionsVerifier.rb +1 -1
  216. data/dist/lib/Glacier2/Router.rb +2 -2
  217. data/dist/lib/Glacier2/SSLInfo.rb +1 -1
  218. data/dist/lib/Glacier2/Session.rb +1 -1
  219. data/dist/lib/Ice/BuiltinSequences.rb +1 -1
  220. data/dist/lib/Ice/CompressBatch.rb +1 -2
  221. data/dist/lib/Ice/Context.rb +1 -1
  222. data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
  223. data/dist/lib/Ice/EndpointTypes.rb +1 -1
  224. data/dist/lib/Ice/Identity.rb +1 -1
  225. data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
  226. data/dist/lib/Ice/Locator.rb +1 -1
  227. data/dist/lib/Ice/LocatorRegistry.rb +1 -1
  228. data/dist/lib/Ice/Metrics.rb +1 -1
  229. data/dist/lib/Ice/OperationMode.rb +2 -3
  230. data/dist/lib/Ice/Process.rb +1 -1
  231. data/dist/lib/Ice/PropertiesAdmin.rb +1 -1
  232. data/dist/lib/Ice/PropertyDict.rb +1 -1
  233. data/dist/lib/Ice/RemoteLogger.rb +2 -3
  234. data/dist/lib/Ice/ReplyStatus.rb +2 -3
  235. data/dist/lib/Ice/Router.rb +1 -1
  236. data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
  237. data/dist/lib/Ice/SliceUtil.rb +2 -2
  238. data/dist/lib/Ice/Struct.rb +1 -0
  239. data/dist/lib/Ice/ToStringMode.rb +1 -2
  240. data/dist/lib/Ice/Value.rb +2 -2
  241. data/dist/lib/Ice/Version.rb +1 -1
  242. data/dist/lib/IceBox/ServiceManager.rb +1 -1
  243. data/dist/lib/IceGrid/Admin.rb +3 -4
  244. data/dist/lib/IceGrid/Descriptor.rb +1 -1
  245. data/dist/lib/IceGrid/Exception.rb +1 -1
  246. data/dist/lib/IceGrid/FileParser.rb +1 -1
  247. data/dist/lib/IceGrid/Registry.rb +2 -3
  248. data/dist/lib/IceGrid/Session.rb +2 -2
  249. data/dist/lib/IceGrid/UserAccountMapper.rb +1 -1
  250. data/dist/lib/IceStorm/IceStorm.rb +1 -1
  251. data/dist/lib/IceStorm/Metrics.rb +1 -1
  252. data/extconf.rb +1 -1
  253. data/ice.gemspec +3 -3
  254. metadata +4 -5
  255. data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
  256. data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
@@ -48,6 +48,16 @@ namespace
48
48
  inline EndpointIPtr toEndpointI(const EndpointPtr& endp) { return dynamic_pointer_cast<EndpointI>(endp); }
49
49
 
50
50
  string emptyName{};
51
+
52
+ // Installed as the dispatch pipeline when the creation of the actual pipeline fails.
53
+ class FailedDispatchPipeline final : public Object
54
+ {
55
+ public:
56
+ void dispatch(IncomingRequest&, std::function<void(OutgoingResponse)>) final
57
+ {
58
+ throw UnknownException{__FILE__, __LINE__, "the object adapter could not create its dispatch pipeline"};
59
+ }
60
+ };
51
61
  }
52
62
 
53
63
  Ice::ObjectAdapter::~ObjectAdapter() = default; // avoid weak vtable
@@ -95,7 +105,7 @@ Ice::ObjectAdapterI::activate()
95
105
  //
96
106
  // One off initializations of the adapter: update the
97
107
  // locator registry and print the "adapter ready"
98
- // message. We set set state to StateActivating to prevent
108
+ // message. We set state to StateActivating to prevent
99
109
  // deactivation from other threads while these one off
100
110
  // initializations are done.
101
111
  //
@@ -121,7 +131,7 @@ Ice::ObjectAdapterI::activate()
121
131
  //
122
132
  // If we couldn't update the locator registry, we let the
123
133
  // exception go through and don't activate the adapter to
124
- // allow to user code to retry activating the adapter
134
+ // allow user code to retry activating the adapter
125
135
  // later.
126
136
  //
127
137
  {
@@ -535,11 +545,29 @@ Ice::ObjectAdapterI::dispatchPipeline() const noexcept
535
545
  lock_guard lock(_mutex);
536
546
  if (!_dispatchPipeline)
537
547
  {
538
- _dispatchPipeline = _servantManager;
539
- while (!_middlewareFactoryStack.empty())
548
+ try
549
+ {
550
+ ObjectPtr dispatchPipeline = _servantManager;
551
+ while (!_middlewareFactoryStack.empty())
552
+ {
553
+ dispatchPipeline = _middlewareFactoryStack.top()(std::move(dispatchPipeline));
554
+ _middlewareFactoryStack.pop();
555
+ }
556
+ _dispatchPipeline = std::move(dispatchPipeline);
557
+ }
558
+ catch (const std::exception& ex)
540
559
  {
541
- _dispatchPipeline = _middlewareFactoryStack.top()(std::move(_dispatchPipeline));
542
- _middlewareFactoryStack.pop();
560
+ Error out(_instance->initializationData().logger);
561
+ out << "failed to create the dispatch pipeline of object adapter '" << _name << "':\n" << ex;
562
+ _dispatchPipeline = make_shared<FailedDispatchPipeline>();
563
+ _middlewareFactoryStack = {};
564
+ }
565
+ catch (...)
566
+ {
567
+ Error out(_instance->initializationData().logger);
568
+ out << "failed to create the dispatch pipeline of object adapter '" << _name << "': unknown c++ exception";
569
+ _dispatchPipeline = make_shared<FailedDispatchPipeline>();
570
+ _middlewareFactoryStack = {};
543
571
  }
544
572
  }
545
573
  return _dispatchPipeline;
@@ -996,15 +1024,6 @@ Ice::ObjectAdapterI::initialize(optional<RouterPrx> router)
996
1024
  // fill in the real port number.
997
1025
  //
998
1026
  vector<EndpointIPtr> endpoints = parseEndpoints(properties->getProperty(_name + ".Endpoints"), true);
999
- for (const auto& endpoint : endpoints)
1000
- {
1001
- for (const auto& expanded : endpoint->expandHost())
1002
- {
1003
- auto factory = make_shared<IncomingConnectionFactory>(_instance, expanded, shared_from_this());
1004
- factory->initialize();
1005
- _incomingConnectionFactories.push_back(factory);
1006
- }
1007
- }
1008
1027
  if (endpoints.empty())
1009
1028
  {
1010
1029
  TraceLevelsPtr tl = _instance->traceLevels();
@@ -1014,6 +1033,24 @@ Ice::ObjectAdapterI::initialize(optional<RouterPrx> router)
1014
1033
  out << "created adapter '" << _name << "' without endpoints";
1015
1034
  }
1016
1035
  }
1036
+ else
1037
+ {
1038
+ // An adapter with endpoints accepts incoming connections, and each connection needs the
1039
+ // adapter's dispatch thread pool. Create it before the first connection factory: its
1040
+ // on-demand creation reads the thread pool properties and can throw, and it must not fail
1041
+ // once connections exist.
1042
+ [[maybe_unused]] auto _ = getThreadPool();
1043
+
1044
+ for (const auto& endpoint : endpoints)
1045
+ {
1046
+ for (const auto& expanded : endpoint->expandHost())
1047
+ {
1048
+ auto factory = make_shared<IncomingConnectionFactory>(_instance, expanded, shared_from_this());
1049
+ factory->initialize();
1050
+ _incomingConnectionFactories.push_back(factory);
1051
+ }
1052
+ }
1053
+ }
1017
1054
  }
1018
1055
 
1019
1056
  //
@@ -1317,7 +1354,7 @@ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locator
1317
1354
  if (_instance->traceLevels()->location >= 1)
1318
1355
  {
1319
1356
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1320
- out << "couldn't update object adapter '" + _id + "' endpoints with the locator registry:\n";
1357
+ out << "could not update object adapter '" + _id + "' endpoints with the locator registry:\n";
1321
1358
  out << "the object adapter is not known to the locator registry";
1322
1359
  }
1323
1360
 
@@ -1328,7 +1365,7 @@ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locator
1328
1365
  if (_instance->traceLevels()->location >= 1)
1329
1366
  {
1330
1367
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1331
- out << "couldn't update object adapter '" + _id + "' endpoints with the locator registry:\n";
1368
+ out << "could not update object adapter '" + _id + "' endpoints with the locator registry:\n";
1332
1369
  out << "the replica group '" << _replicaGroupId << "' is not known to the locator registry";
1333
1370
  }
1334
1371
 
@@ -1339,7 +1376,7 @@ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locator
1339
1376
  if (_instance->traceLevels()->location >= 1)
1340
1377
  {
1341
1378
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1342
- out << "couldn't update object adapter '" + _id + "' endpoints with the locator registry:\n";
1379
+ out << "could not update object adapter '" + _id + "' endpoints with the locator registry:\n";
1343
1380
  out << "the object adapter endpoints are already set";
1344
1381
  }
1345
1382
 
@@ -1358,7 +1395,7 @@ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locator
1358
1395
  if (_instance->traceLevels()->location >= 1)
1359
1396
  {
1360
1397
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1361
- out << "couldn't update object adapter '" + _id + "' endpoints with the locator registry:\n" << ex;
1398
+ out << "could not update object adapter '" + _id + "' endpoints with the locator registry:\n" << ex;
1362
1399
  }
1363
1400
  throw; // TODO: Shall we raise a special exception instead of a non obvious local exception?
1364
1401
  }
@@ -298,7 +298,7 @@ IceInternal::OpaqueEndpointI::checkOption(const string& option, const string& ar
298
298
  __LINE__,
299
299
  "invalid type value '" + argument + "' in endpoint '" + endpoint + "'");
300
300
  }
301
- else if (t < 0 || t > 65535)
301
+ else if (t < 0 || t > 32767)
302
302
  {
303
303
  throw ParseException(
304
304
  __FILE__,
@@ -322,17 +322,17 @@ IceInternal::OpaqueEndpointI::checkOption(const string& option, const string& ar
322
322
  __LINE__,
323
323
  "no argument provided for -v option in endpoint '" + endpoint + "'");
324
324
  }
325
- for (char i : argument)
325
+ try
326
+ {
327
+ const_cast<vector<byte>&>(_rawBytes) = Base64::decode(argument);
328
+ }
329
+ catch (const std::invalid_argument& ex)
326
330
  {
327
- if (!Base64::isBase64(i))
328
- {
329
- ostringstream os;
330
- os << "invalid base64 character '" << i << "' (ordinal " << static_cast<int>(i) << ") in endpoint '"
331
- << endpoint << "'";
332
- throw ParseException(__FILE__, __LINE__, os.str());
333
- }
331
+ throw ParseException(
332
+ __FILE__,
333
+ __LINE__,
334
+ "invalid base64 value in endpoint '" + endpoint + "':\n" + ex.what());
334
335
  }
335
- const_cast<vector<byte>&>(_rawBytes) = Base64::decode(argument);
336
336
  return true;
337
337
  }
338
338
 
@@ -51,7 +51,7 @@ IceInternal::Options::checkArgs(const string& shortOpt, const string& longOpt, b
51
51
  {
52
52
  string err = "'";
53
53
  err += shortOpt;
54
- err += "': a short option cannot be `-'";
54
+ err += "': a short option cannot be '-'";
55
55
  throw invalid_argument(err);
56
56
  }
57
57
  }
@@ -69,7 +69,7 @@ IceInternal::Options::checkArgs(const string& shortOpt, const string& longOpt, b
69
69
  {
70
70
  string err = "'";
71
71
  err += longOpt;
72
- err += "': a long option must not contain a leading `-'";
72
+ err += "': a long option must not contain a leading '-'";
73
73
  throw invalid_argument(err);
74
74
  }
75
75
  }
@@ -627,6 +627,11 @@ IceInternal::Options::parse(const StringVector& args)
627
627
  argDone = true;
628
628
  break;
629
629
  }
630
+
631
+ // This option is the last character in the cluster and its argument is the next argv element,
632
+ // consumed by the "if (!argDone)" code below. Reset argDone in case a preceding no-argument
633
+ // option in this cluster set it (for example "-dI dir").
634
+ argDone = false;
630
635
  }
631
636
  else
632
637
  {
@@ -481,7 +481,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread)
481
481
  }
482
482
  }
483
483
  }
484
- catch (const Exception&)
484
+ catch (...)
485
485
  {
486
486
  // If called from the user thread we re-throw, the exception will be caught by the caller and handled using
487
487
  // abort.
@@ -306,7 +306,7 @@ Ice::OutputStream::writeEncapsulation(const byte* v, int32_t sz)
306
306
 
307
307
  Container::size_type position = b.size();
308
308
  resize(position + static_cast<size_t>(sz));
309
- memcpy(&b[position], &v[0], static_cast<size_t>(sz));
309
+ memcpy(&b[position], v, static_cast<size_t>(sz));
310
310
  }
311
311
 
312
312
  void
@@ -338,7 +338,7 @@ Ice::OutputStream::writeBlob(const vector<byte>& v)
338
338
  {
339
339
  Container::size_type pos = b.size();
340
340
  resize(pos + v.size());
341
- memcpy(&b[pos], &v[0], v.size());
341
+ memcpy(&b[pos], v.data(), v.size());
342
342
  }
343
343
  }
344
344
 
@@ -1006,7 +1006,7 @@ void
1006
1006
  Ice::OutputStream::EncapsEncoder10::write(const UserException& v)
1007
1007
  {
1008
1008
  //
1009
- // User exception with the 1.0 encoding start with a boolean
1009
+ // User exceptions with the 1.0 encoding start with a boolean
1010
1010
  // flag that indicates whether or not the exception uses
1011
1011
  // classes.
1012
1012
  //
@@ -1398,7 +1398,7 @@ Ice::OutputStream::EncapsEncoder11::writeInstance(const shared_ptr<Value>& v)
1398
1398
  assert(v);
1399
1399
 
1400
1400
  //
1401
- // If the instance was already marshaled, just write it's ID.
1401
+ // If the instance was already marshaled, just write its ID.
1402
1402
  //
1403
1403
  auto q = _marshaledMap.find(v);
1404
1404
  if (q != _marshaledMap.end())
@@ -279,7 +279,13 @@ Ice::PluginManagerI::loadPlugin(PluginFactoryFunc factoryFunc, const string& nam
279
279
  "invalid arguments for plug-in '" + name + "':\n" + string{ex.what()});
280
280
  }
281
281
 
282
- assert(!args.empty());
282
+ if (args.empty())
283
+ {
284
+ throw PluginInitializationException(
285
+ __FILE__,
286
+ __LINE__,
287
+ "no entry point specified for plug-in '" + name + "'");
288
+ }
283
289
 
284
290
  //
285
291
  // Shift the arguments.
@@ -315,6 +315,7 @@ Ice::Properties::getPropertyAsListWithDefault(string_view key, const StringSeq&
315
315
  {
316
316
  Warning out(getProcessLogger());
317
317
  out << "mismatched quotes in property " << key << "'s value, returning default value";
318
+ return value;
318
319
  }
319
320
  if (result.size() == 0)
320
321
  {
@@ -359,27 +360,28 @@ Ice::Properties::setProperty(string_view key, string_view value)
359
360
  }
360
361
 
361
362
  // Check if the property is in an Ice property prefix. If so, check that it's a valid property.
362
- if (auto propertyArray = findIcePropertyArray(key))
363
+ if (auto propertyArray = findIcePropertyArray(currentKey))
363
364
  {
364
365
  if (propertyArray->isOptIn &&
365
366
  find(_optInPrefixes.begin(), _optInPrefixes.end(), propertyArray->name) == _optInPrefixes.end())
366
367
  {
367
368
  ostringstream os;
368
- os << "unable to set '" << key << "': property prefix '" << propertyArray->name
369
+ os << "unable to set '" << currentKey << "': property prefix '" << propertyArray->name
369
370
  << "' is opt-in and must be explicitly enabled.";
370
371
  throw PropertyException{__FILE__, __LINE__, os.str()};
371
372
  }
372
373
  string propertyPrefix{propertyArray->name};
373
- auto prop = IceInternal::findProperty(key.substr(propertyPrefix.length() + 1), propertyArray);
374
+ auto prop =
375
+ IceInternal::findProperty(string_view{currentKey}.substr(propertyPrefix.length() + 1), propertyArray);
374
376
  if (!prop)
375
377
  {
376
- throw PropertyException{__FILE__, __LINE__, "unknown Ice property: " + string{key}};
378
+ throw PropertyException{__FILE__, __LINE__, "unknown Ice property: " + currentKey};
377
379
  }
378
380
 
379
381
  // If the property is deprecated, log a warning.
380
382
  if (prop->deprecated)
381
383
  {
382
- getProcessLogger()->warning("setting deprecated property: " + string{key});
384
+ getProcessLogger()->warning("setting deprecated property: " + currentKey);
383
385
  }
384
386
  }
385
387
 
@@ -495,7 +497,15 @@ Ice::Properties::load(string_view file)
495
497
  DWORD keyType;
496
498
  DWORD nameBufSize = static_cast<DWORD>(nameBuf.size());
497
499
  DWORD dataBufSize = static_cast<DWORD>(dataBuf.size());
498
- err = RegEnumValueW(iceKey, i, &nameBuf[0], &nameBufSize, nullptr, &keyType, &dataBuf[0], &dataBufSize);
500
+ err = RegEnumValueW(
501
+ iceKey,
502
+ i,
503
+ nameBuf.data(),
504
+ &nameBufSize,
505
+ nullptr,
506
+ &keyType,
507
+ dataBuf.data(),
508
+ &dataBufSize);
499
509
  if (err != ERROR_SUCCESS || nameBufSize == 0)
500
510
  {
501
511
  ostringstream os;
@@ -503,7 +513,7 @@ Ice::Properties::load(string_view file)
503
513
  << ":\n";
504
514
  if (nameBufSize == 0)
505
515
  {
506
- os << "property name can't be the empty string";
516
+ os << "property name cannot be the empty string";
507
517
  }
508
518
  else
509
519
  {
@@ -512,8 +522,7 @@ Ice::Properties::load(string_view file)
512
522
  getProcessLogger()->warning(os.str());
513
523
  continue;
514
524
  }
515
- string name =
516
- wstringToString(wstring(reinterpret_cast<wchar_t*>(&nameBuf[0]), nameBufSize), stringConverter);
525
+ string name = wstringToString(wstring(nameBuf.data(), nameBufSize), stringConverter);
517
526
  if (keyType != REG_SZ && keyType != REG_EXPAND_SZ)
518
527
  {
519
528
  ostringstream os;
@@ -523,7 +532,8 @@ Ice::Properties::load(string_view file)
523
532
  }
524
533
 
525
534
  string value;
526
- wstring valueW = wstring(reinterpret_cast<wchar_t*>(&dataBuf[0]), (dataBufSize / sizeof(wchar_t)) - 1);
535
+ wstring valueW =
536
+ wstring(reinterpret_cast<wchar_t*>(dataBuf.data()), (dataBufSize / sizeof(wchar_t)) - 1);
527
537
  if (keyType == REG_SZ)
528
538
  {
529
539
  value = wstringToString(valueW, stringConverter);
@@ -533,14 +543,14 @@ Ice::Properties::load(string_view file)
533
543
  vector<wchar_t> expandedValue(1024);
534
544
  DWORD sz = ExpandEnvironmentStringsW(
535
545
  valueW.c_str(),
536
- &expandedValue[0],
546
+ expandedValue.data(),
537
547
  static_cast<DWORD>(expandedValue.size()));
538
548
  if (sz >= expandedValue.size())
539
549
  {
540
550
  expandedValue.resize(sz + 1);
541
551
  if (ExpandEnvironmentStringsW(
542
552
  valueW.c_str(),
543
- &expandedValue[0],
553
+ expandedValue.data(),
544
554
  static_cast<DWORD>(expandedValue.size())) == 0)
545
555
  {
546
556
  ostringstream os;
@@ -551,7 +561,7 @@ Ice::Properties::load(string_view file)
551
561
  continue;
552
562
  }
553
563
  }
554
- value = wstringToString(wstring(&expandedValue[0], sz - 1), stringConverter);
564
+ value = wstringToString(wstring(expandedValue.data(), sz - 1), stringConverter);
555
565
  }
556
566
  setProperty(name, value);
557
567
  }
@@ -893,15 +903,15 @@ Ice::Properties::loadConfig()
893
903
  {
894
904
  #ifdef _WIN32
895
905
  vector<wchar_t> v(256);
896
- DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], static_cast<DWORD>(v.size()));
906
+ DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG", v.data(), static_cast<DWORD>(v.size()));
897
907
  if (ret >= v.size())
898
908
  {
899
909
  v.resize(ret + 1);
900
- ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], static_cast<DWORD>(v.size()));
910
+ ret = GetEnvironmentVariableW(L"ICE_CONFIG", v.data(), static_cast<DWORD>(v.size()));
901
911
  }
902
912
  if (ret > 0)
903
913
  {
904
- value = wstringToString(wstring(&v[0], ret), getProcessStringConverter());
914
+ value = wstringToString(wstring(v.data(), ret), getProcessStringConverter());
905
915
  }
906
916
  else
907
917
  {
@@ -82,7 +82,7 @@ IceInternal::validatePropertiesWithPrefix(
82
82
  PropertyDict props = properties->getPropertiesForPrefix(string{prefix} + ".");
83
83
  for (const auto& p : props)
84
84
  {
85
- // Plus one to include the dot.
85
+ // Plus one to skip the dot.
86
86
  if (!findProperty(p.first.substr(prefix.size() + 1), propertyArray))
87
87
  {
88
88
  unknownProps.push_back(p.first);
@@ -136,17 +136,6 @@ IceInternal::ProtocolInstance::defaultSourceAddress() const
136
136
  return instance->defaultsAndOverrides()->defaultSourceAddress;
137
137
  }
138
138
 
139
- const EncodingVersion&
140
- IceInternal::ProtocolInstance::defaultEncoding() const
141
- {
142
- InstancePtr instance = _instance.lock();
143
- if (!instance)
144
- {
145
- throw CommunicatorDestroyedException{__FILE__, __LINE__};
146
- }
147
- return instance->defaultsAndOverrides()->defaultEncoding;
148
- }
149
-
150
139
  NetworkProxyPtr
151
140
  IceInternal::ProtocolInstance::networkProxy() const
152
141
  {
@@ -45,7 +45,6 @@ namespace IceInternal
45
45
  [[nodiscard]] ProtocolSupport protocolSupport() const;
46
46
  [[nodiscard]] const std::string& defaultHost() const;
47
47
  [[nodiscard]] const Address& defaultSourceAddress() const;
48
- [[nodiscard]] const Ice::EncodingVersion& defaultEncoding() const;
49
48
  [[nodiscard]] NetworkProxyPtr networkProxy() const;
50
49
  [[nodiscard]] std::int32_t messageSizeMax() const;
51
50
 
@@ -60,7 +59,7 @@ namespace IceInternal
60
59
  ProtocolInstance(const InstancePtr&, std::int16_t, std::string, bool);
61
60
  friend class Instance;
62
61
  // Use a weak pointer to avoid circular references. The communicator owns the endpoint factory, which in
63
- // turn own this protocol instance.
62
+ // turn owns this protocol instance.
64
63
  const std::weak_ptr<Instance> _instance;
65
64
  const int _traceLevel;
66
65
  const std::string _traceCategory;
@@ -207,7 +207,15 @@ Ice::ObjectPrx::ice_isFixed() const noexcept
207
207
  ConnectionPtr
208
208
  Ice::ObjectPrx::ice_getCachedConnection() const noexcept
209
209
  {
210
- return _requestHandlerCache->getCachedConnection();
210
+ // A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
211
+ if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
212
+ {
213
+ return fixedReference->fixedConnection();
214
+ }
215
+ else
216
+ {
217
+ return _requestHandlerCache->getCachedConnection();
218
+ }
211
219
  }
212
220
 
213
221
  CommunicatorPtr
@@ -6,10 +6,15 @@
6
6
  #include "CollocatedRequestHandler.h"
7
7
  #include "ConnectionI.h"
8
8
  #include "Ice/InputStream.h"
9
+ #include "Ice/LoggerUtil.h"
9
10
  #include "Ice/OutgoingAsync.h"
10
11
  #include "Ice/OutputStream.h"
11
12
  #include "Ice/Proxy.h"
13
+ #include "Instance.h"
14
+ #include "Reference.h"
12
15
  #include "ReferenceFactory.h"
16
+ #include "RequestHandler.h"
17
+ #include "ThreadPool.h"
13
18
 
14
19
  using namespace std;
15
20
  using namespace Ice;
@@ -77,7 +82,20 @@ namespace IceInternal
77
82
  : ProxyGetConnection(std::move(proxy)),
78
83
  LambdaInvoke(std::move(ex), std::move(sent))
79
84
  {
80
- _response = [&, response = std::move(response)](bool) { response(getConnection()); };
85
+ _response = [this, response = std::move(response)](bool)
86
+ {
87
+ if (response)
88
+ {
89
+ try
90
+ {
91
+ response(getConnection());
92
+ }
93
+ catch (...)
94
+ {
95
+ warning("response", std::current_exception());
96
+ }
97
+ }
98
+ };
81
99
  }
82
100
  };
83
101
 
@@ -172,13 +190,14 @@ namespace IceInternal
172
190
  {
173
191
  _response = [this, response = std::move(response)](bool ok)
174
192
  {
175
- if (this->_is.b.empty())
193
+ R v = this->_is.b.empty() ? R{ok, {}} : this->_read(ok, &this->_is);
194
+ try
176
195
  {
177
- response(R{ok, {}});
196
+ response(std::move(v));
178
197
  }
179
- else
198
+ catch (...)
180
199
  {
181
- response(this->_read(ok, &this->_is));
200
+ this->warning("response", std::current_exception());
182
201
  }
183
202
  };
184
203
  }
@@ -282,6 +301,18 @@ ProxyGetConnection::ProxyGetConnection(ObjectPrx proxy) : ProxyOutgoingAsyncBase
282
301
  AsyncStatus
283
302
  ProxyGetConnection::invokeRemote(const ConnectionIPtr& connection, bool, bool)
284
303
  {
304
+ // A fixed proxy never reaches the invocation machinery: invoke returns its bound connection directly.
305
+ assert(!_proxy.ice_isFixed());
306
+ try
307
+ {
308
+ connection->throwException();
309
+ }
310
+ catch (const Ice::LocalException&)
311
+ {
312
+ // The connection is closed: throw RetryException so that the caller clears the cached request handler
313
+ // and calls invokeRemote again with a new connection.
314
+ throw RetryException(current_exception());
315
+ }
285
316
  _cachedConnection = connection;
286
317
  if (responseImpl(true, true))
287
318
  {
@@ -602,7 +633,15 @@ Ice::ObjectPrx::ice_invokeAsync(
602
633
  Ice::ConnectionPtr
603
634
  Ice::ObjectPrx::ice_getConnection() const
604
635
  {
605
- return ice_getConnectionAsync().get();
636
+ // A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
637
+ if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
638
+ {
639
+ return fixedReference->fixedConnection();
640
+ }
641
+ else
642
+ {
643
+ return ice_getConnectionAsync().get();
644
+ }
606
645
  }
607
646
 
608
647
  std::function<void()>
@@ -611,18 +650,76 @@ Ice::ObjectPrx::ice_getConnectionAsync(
611
650
  std::function<void(std::exception_ptr)> ex,
612
651
  std::function<void(bool)> sent) const
613
652
  {
614
- using LambdaOutgoing = ProxyGetConnectionLambda;
615
- auto outAsync = std::make_shared<LambdaOutgoing>(*this, std::move(response), std::move(ex), std::move(sent));
616
- _iceI_getConnection(outAsync);
617
- return [outAsync]() { outAsync->cancel(); };
653
+ // A fixed proxy is bound to a single connection: return this connection as is, whatever its state. The response
654
+ // callback is executed from the thread pool that services this connection (or by the executor, if set). Like for
655
+ // the response callback of a lambda invocation, an exception thrown by the callback is logged as an
656
+ // Ice.Warn.AMICallback warning.
657
+ if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
658
+ {
659
+ if (response)
660
+ {
661
+ InstancePtr instance = fixedReference->getInstance();
662
+ ConnectionIPtr connection = fixedReference->fixedConnection();
663
+ connection->getThreadPool()->execute(
664
+ [response = std::move(response), connection, instance = std::move(instance)]()
665
+ {
666
+ try
667
+ {
668
+ response(connection);
669
+ }
670
+ catch (...)
671
+ {
672
+ if (instance->initializationData().properties->getIcePropertyAsInt("Ice.Warn.AMICallback") > 0)
673
+ {
674
+ Warning out(instance->initializationData().logger);
675
+ try
676
+ {
677
+ throw;
678
+ }
679
+ catch (const Ice::Exception& e)
680
+ {
681
+ out << "Ice::Exception raised by response callback:\n" << e;
682
+ }
683
+ catch (const std::exception& e)
684
+ {
685
+ out << "std::exception raised by response callback:\n" << e.what();
686
+ }
687
+ catch (...)
688
+ {
689
+ out << "unknown exception raised by response callback";
690
+ }
691
+ }
692
+ }
693
+ },
694
+ connection);
695
+ }
696
+ return [] {};
697
+ }
698
+ else
699
+ {
700
+ using LambdaOutgoing = ProxyGetConnectionLambda;
701
+ auto outAsync = std::make_shared<LambdaOutgoing>(*this, std::move(response), std::move(ex), std::move(sent));
702
+ _iceI_getConnection(outAsync);
703
+ return [outAsync]() { outAsync->cancel(); };
704
+ }
618
705
  }
619
706
 
620
707
  std::future<Ice::ConnectionPtr>
621
708
  Ice::ObjectPrx::ice_getConnectionAsync() const
622
709
  {
623
- auto outAsync = std::make_shared<ProxyGetConnectionPromise>(*this);
624
- _iceI_getConnection(outAsync);
625
- return outAsync->getFuture();
710
+ // A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
711
+ if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
712
+ {
713
+ promise<Ice::ConnectionPtr> p;
714
+ p.set_value(fixedReference->fixedConnection());
715
+ return p.get_future();
716
+ }
717
+ else
718
+ {
719
+ auto outAsync = std::make_shared<ProxyGetConnectionPromise>(*this);
720
+ _iceI_getConnection(outAsync);
721
+ return outAsync->getFuture();
722
+ }
626
723
  }
627
724
 
628
725
  void