Unfortunately this doesn't work as-is because I couldn't find primitives to
flush the out_queue. It's left as a to-do for now.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
void mark_down() override {
// silently ignore
}
+ void shutdown() override {
+ // silengtly ignore
+ }
void mark_disposable() override {
// silengtly ignore
}
*/
virtual void mark_disposable() = 0;
+ /*
+ * Politely shutdown the connection. Finish sending any messages. This
+ * queues a connection reset event.
+ */
+ virtual void shutdown() = 0;
+
// WARNING / FIXME: this is not populated for loopback connections
AuthCapsInfo& get_peer_caps_info() {
return peer_caps_info;
if (need_queue_reset) dispatch_queue->queue_reset(this);
}
+void AsyncConnection::shutdown()
+{
+ /* FIXME: stop() discards out queue so this doesn't actually flush sent messages */
+ return stop(true);
+}
+
void AsyncConnection::cleanup() {
shutdown_socket();
delete read_handler;
void process();
void wakeup_from(uint64_t id);
void tick(uint64_t id);
+ void shutdown() override;
void stop(bool queue_reset);
void cleanup();
PerfCounters *get_perf_counter() {