boost asio async_receive completion handler getting called with 0 bytes_transferred with out any error [closed]

StackOverflow https://stackoverflow.com/questions/21988084

  •  15-10-2022
  •  | 
  •  

문제

I am debugging a boost asio unix domain protocol client, after i issue async_receive , the completion handler gets called infinitely with 0 bytes_transferred, there are no errors passed to the completion handler. the error code is success.

도움이 되었습니까?

해결책

Finally i got the problem nailed , i am posting the answer here , just incase some body else might very likely run into the same problem.

The completion handler falls into infinite loop if the boost::asio::buffer passed to the async_receive function is of length 0. In my case i was passing a vector of size 0.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top