Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1649

[cpp] Reconnecting container cannot be stopped from a scheduled task

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • proton-j-0.18.0
    • proton-c-0.19.0
    • cpp-binding
    • None

    Description

      The following test will get stuck

      struct timed_reconnect_tester : public proton::messaging_handler {
          struct timer_handler : public proton::void_function0 {
              proton::container *c = nullptr;
              void operator()() PN_CPP_OVERRIDE {
                  c->stop();
              }
          };
      
          test_port port;
          timer_handler handler;
      
          void on_container_start(proton::container &c) PN_CPP_OVERRIDE {
              c.listen(port.url());
      
              handler.c = &c;
              proton::reconnect_options reconnect_options;
              c.connect(port.url("127.0.0.1"), proton::connection_options().reconnect(reconnect_options));
              c.schedule(proton::duration::IMMEDIATE, handler);
          }
      };
      
      int test_timed_reconnect() {
          timed_reconnect_tester t;
          proton::container(t).run();
          return 0;
      }
      

      Attachments

        Issue Links

          Activity

            People

              astitcher Andrew Stitcher
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: