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