Hello,
If you try to connect using an invalid server port on windows, the proton
client blocks for 2 seconds. On linux we do not have this problem.
Do you have any idea why?
Best regards,
Rabih
OS: Windows 7, Compiler: MSVC 2013 Version 12 Update 5, Proton: 0.22.0
Sample code:
class hello_world : public proton::messaging_handler {
void on_container_start(proton::container& c) override{
c.connect("localhost:7777"); // no server is started on this port
}
};
int main()
{
hello_world hw;
std::chrono::steady_clock::time_point begin =
std::chrono::steady_clock::now();
try {
proton::container(hw).run();
}
catch (const std::exception& ) {}
std::chrono::steady_clock::time_point end =
std::chrono::steady_clock::now();
std::cout << "Time difference = " <<
std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count()
<< std::endl;
return 0;
}