Opened 8 years ago
Last modified 5 years ago
#10906 new Bugs
async_connect can't be stopped on boost 1.57, win 7 64bit
Reported by: | anonymous | Owned by: | chris_kohlhoff |
---|---|---|---|
Milestone: | Boost 1.58.0 | Component: | asio |
Version: | Boost 1.57.0 | Severity: | Regression |
Keywords: | boost asio async_connect | Cc: |
Description
I currently use Windows 7 64bit, MSVC2010 and Boost.Asio 1.57. I would like to connect to a TCP server with a timeout. If the timeout expires, I should close the connection as soon as possible as the IP address (chosen by a user) is probably wrong.
With my computer, closing the socket takes about 15 seconds to complete, which makes my program not responsive for a while. On Linux the same code seems to be fine. I attach a code that reproduce the problem.
Attachments (1)
Change History (5)
by , 8 years ago
comment:1 by , 8 years ago
My example is clearly working on Boost 1.55 and is failing on Boost 1.57. On Boost 1.55 socket.close() cancel all asynchronous call immediately, which is not the case on the 1.57 version. Best regards, Poukill
comment:2 by , 7 years ago
I'm experiencing a similar problem. An executable compiled with boost 1.58 works fine in Windows 10 but has this flaw in Windows 7
comment:3 by , 5 years ago
I have the same problem under Windows 10 Pro, 10.0.15063 compilation 15063 and Boost 1.62. The async_connect handler is not getting called, regardless if I call .close() or .cancel() on the socket.
comment:4 by , 5 years ago
Please disregard my last comment. I've found a problem in my code. Sorry for the confusion.
code that reproduces the problem.