qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rabih M <rabih.prom...@gmail.com>
Subject Re: [proton C++ 0.16.0] idle_timeout on windows can't be less than 1s
Date Wed, 19 Apr 2017 09:23:45 GMT
Hello Cliff,

Here is the jira issue: https://issues.apache.org/jira/browse/PROTON-1464

Thanks,
Rabih

On Thu, Apr 13, 2017 at 10:16 PM, Cliff Jansen <cliffjansen@gmail.com>
wrote:

> This should work on Windows too.
>
> Could you please raise a JIRA?  Thanks.
>
> Cliff
>
> On 4/12/17, Rabih M <rabih.promail@gmail.com> wrote:
> > Hello,
> >
> > 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.
> >
> > Is it a bug ?
> >
> > Best regards,
> > Rabih
> >
> >
> > #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;
> > }
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message