qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rabih Mourad (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PROTON-1464) Idle_timeout on windows can't be less than 1s
Date Wed, 19 Apr 2017 09:21:41 GMT
Rabih Mourad created PROTON-1464:

             Summary: Idle_timeout on windows can't be less than 1s
                 Key: PROTON-1464
                 URL: https://issues.apache.org/jira/browse/PROTON-1464
             Project: Qpid Proton
          Issue Type: Bug
          Components: cpp-binding
    Affects Versions: 0.17.0, 0.16.0
            Reporter: Rabih Mourad
            Assignee: Cliff Jansen

I noticed that windows does not take into consideration the configured connection idle_timeout
if it is less than 1 second. Linux does not have this problem.

I wrote some code to reproduce at the end of the mail:

#include <proton/messaging_handler.hpp>
#include <proton/connection.hpp>
#include <proton/connection_options.hpp> #include <proton/default_container.hpp>
#include <Windows.h>

class hello_world : public proton::messaging_handler {
   void on_container_start(proton::container& c) {
proton::connection_options().idle_timeout(proton::duration(10))); //takes ~1000ms
       // or c.connect("host:777777",
proton::connection_options().idle_timeout(proton::duration(10))); //takes ~ 2500ms

int main() {
   LARGE_INTEGER frequency;
   LARGE_INTEGER t1, t2;

   try {
      hello_world hw;
      return 0;
   catch (const std::exception& e) {
      std::cerr << e.what() << std::endl;

   double elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart;
   std::cout << "elapsed: " << elapsedTime << std::endl;

   return 1;

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message