client: handle recv error