30 Apr
2009
30 Apr
'09
7:52 a.m.
Hi! I've got very strange problem - handler passed to async_write is not called in time. What I mean - it is called only when socket is closed - then handler is invoked many times. Sometimes it is so, sometimes everything is fine. The main thing is that traffic exists. I mean - async writes get completed. I call io_service.run() in proper time, etc. Another moment - the first two times the handler is invoked, but not more. As I guess, the problem is somewhere in my code. But I ask you to point to probable reasons of such behaviour that breaks asio rules..