File tree Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -225,36 +225,10 @@ void JsonRpcConnection::Disconnect()
225
225
226
226
m_WriterDone.Wait (yc);
227
227
228
- /*
229
- * Do not swallow exceptions in a coroutine.
230
- * https://github.com/Icinga/icinga2/issues/7351
231
- * We must not catch `detail::forced_unwind exception` as
232
- * this is used for unwinding the stack.
233
- *
234
- * Just use the error_code dummy here.
235
- */
236
- boost::system ::error_code ec;
237
-
238
228
m_CheckLivenessTimer.cancel ();
239
229
m_HeartbeatTimer.cancel ();
240
230
241
- m_Stream->lowest_layer ().cancel (ec);
242
-
243
- Timeout::Ptr shutdownTimeout (new Timeout (
244
- m_IoStrand.context (),
245
- m_IoStrand,
246
- boost::posix_time::seconds (10 ),
247
- [this , keepAlive](asio::yield_context yc) {
248
- boost::system ::error_code ec;
249
- m_Stream->lowest_layer ().cancel (ec);
250
- }
251
- ));
252
-
253
- m_Stream->next_layer ().async_shutdown (yc[ec]);
254
-
255
- shutdownTimeout->Cancel ();
256
-
257
- m_Stream->lowest_layer ().shutdown (m_Stream->lowest_layer ().shutdown_both , ec);
231
+ m_Stream->GracefulDisconnect (m_IoStrand, yc);
258
232
});
259
233
}
260
234
}
You can’t perform that action at this time.
0 commit comments