Seems to be fixed. It may have been the effect of multiple bugs.
Had some thread racings and passed a temporary variable as an argument to an async handler.

Thanks for all the help!

2011/7/1 Indrek Sünter <indreksnt@gmail.com>
Strange, because I can run it on any other thread except for the one that the socket was constructed with.
With the socket thread, it always crashes at the deletion of io_service.
With any other thread, it works well.

Also, this problem only seems to appear on Windows 7 (64bit, boost 1.46.1) and not on Ubuntu 11.04 (64bit, boost 1.42.0).
Need to check it on some other versions and platforms. Might be that I'm doing something that's not portable.

On Fri, Jul 1, 2011 at 6:54 PM, Igor R <boost.lists@gmail.com> wrote:
> It seems that async_connect should not be called from the same service or thread that the socket is working on.
> I wonder if this is correct or I have made a mistake somewhere that causes such behavior.

No, this's not correct.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users