MCPcopy Create free account
hub / github.com/apache/qpid-proton / on_session_close

Method on_session_close

cpp/examples/broker.cpp:384–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382 }
383
384 void on_session_close(proton::session &session) override {
385 // Unsubscribe all senders that belong to session.
386 for (proton::sender_iterator i = session.senders().begin(); i != session.senders().end(); ++i) {
387 Sender* s = Sender::get(*i);
388 if (s && s->queue_) {
389 auto q = s->queue_;
390 s->queue_->add([=]{q->unsubscribe(s);});
391 }
392 }
393 }
394
395 void on_error(const proton::error_condition& e) override {
396 std::cout << "protocol error: " << e.what() << std::endl;

Callers

nothing calls this directly

Calls 6

getFunction · 0.50
beginMethod · 0.45
sendersMethod · 0.45
endMethod · 0.45
addMethod · 0.45
unsubscribeMethod · 0.45

Tested by

no test coverage detected