AsyncMessenger: a trivial refactory and a fix

I think we need to capture EAGAIN above, like

if (errno == EINGR)
    continue;
else if (errno == EAGAN)
    r = len;

return code EAGAIN is legal value and we can't return -1 directly. Then EAGAIN is a common return code which don't need to output as "1" level.