PROTON-1226: set handler directly on inbound connection configuration
diff --git a/proton-c/bindings/cpp/src/container_impl.cpp b/proton-c/bindings/cpp/src/container_impl.cpp
index ca12727..ce6a2b2 100644
--- a/proton-c/bindings/cpp/src/container_impl.cpp
+++ b/proton-c/bindings/cpp/src/container_impl.cpp
@@ -253,6 +253,13 @@
     connection_options opts = server_connection_options_;
     opts.update(lc.get_options());
     opts.apply(c);
+    // Handler applied separately
+    proton_handler *h = opts.handler();
+    if (h) {
+        internal::pn_ptr<pn_handler_t> chandler = cpp_handler(h);
+        pn_record_t *record = pn_connection_attachments(unwrap(c));
+        pn_record_set_handler(record, chandler.get());
+    }
 }
 
 void container_impl::run() {