Re: [asio-users] async_connect calling handler befor connect completed?
Brought to you by:
chris_kohlhoff
From: Dimitri E. P. <dp...@e3...> - 2006-06-20 22:54:38
|
Well it turned out that I was having some synchronization issues between threads. I had one thread already running the demuxer and called async_connect from a different thread. Once I called async_connect from the same thread as thre demuxer everything worked fine. thanks for your help Dimitri Christopher Kohlhoff wrote: > Hi Dimitri, > > Dimitri E. Prado <dp...@e3...> wrote: > >> I just started using asio and I am having some trouble with >> async_connect and async_handshake on windows ( XP sp2 ) using >> asio 0.3.6 . If I call async_handshake from the handler passed >> to async_connect I imediatelly get a 10057 ( WSAENOTCONN) >> error , if I sleep for a while and call async_handshake all is >> fine and Tls handshaking proceeds correctly. This is the code >> I am using: >> > > I can't see any obvious problems in your code. Have you tried > the SSL example programs to see if they also have the problem? I > just tried the example from the latest CVS version of asio on my > system (also XP SP2, using VC 8.0) and it all worked ok. > > Cheers, > Chris > > > > > > > _______________________________________________ > asio-users mailing list > asi...@li... > https://lists.sourceforge.net/lists/listinfo/asio-users > |