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: {noformat} #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 { public: void on_container_start(proton::container& c) { c.connect("localhost:777777", 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; QueryPerformanceFrequency(&frequency); QueryPerformanceCounter(&t1); try { hello_world hw; proton::default_container(hw).run(); return 0; } catch (const std::exception& e) { std::cerr << e.what() << std::endl; } QueryPerformanceCounter(&t2); double elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart; std::cout << "elapsed: " << elapsedTime << std::endl; return 1; }{noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org