crete-dev icon indicating copy to clipboard operation
crete-dev copied to clipboard

Add support for timeouts in asio/server

Open moralismercatus opened this issue 8 years ago • 2 comments

This is an addition only. It does not change any existing functionality. Server::open_connection_wait() is given an overload that takes a time duration. The connection attempt will abort if not made within the given time.

moralismercatus avatar Jan 05 '17 19:01 moralismercatus

@moralismercatus Thanks for the PR.

Have you run regression test on this change?

And what is the plan for fixing the problem of using Server::open_connection_wait() without timeout? I am assuming you are only adding a new Server::open_connection_wait() with timeout, but it is not being used. Please correct me if I misunderstood it.

likebreath avatar Jan 09 '17 22:01 likebreath

I have successfully compiled it on guest and host. As it doesn't effect the functionality, I didn't run any regression tests.

You are correct. The new function is not being used.

There are a few places where the new function needs to be used. In fact, I believe it should replace all existing open_connect_wait() calls. I'll have that implemented soon. I'd like to have this addition as a separate PR, so I can get more familiar with the process.

moralismercatus avatar Jan 10 '17 16:01 moralismercatus