[PATCH 3/3] Fix cli socket close due to io buffer full